From patchwork Fri Oct 12 17:09:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Schwab X-Patchwork-Id: 191164 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id CCFC62C0093 for ; Sat, 13 Oct 2012 04:09:48 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1350666589; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:From:To:Cc:Subject:References:Date:In-Reply-To: Message-ID:User-Agent:MIME-Version:Content-Type:Mailing-List: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:Sender:Delivered-To; bh=C7VQxsQ6KzUWf1iLTZWixZFdEkM=; b=wjE/b3mCL9S835j+ZhzcvSt5MlWtzn4SJOzBwQIo4rf/paJbZ4sd1KzilVKhnY nvX1b5vu8gWEPXzo88LwSGdTqpn7+WCASifpWmzvpQCfobY+c2QXspVxD5hDhkQ8 GRfcSDMuUyWHEc2vTjsrmmtB40RWvDzlr2309iQ5+qIr0= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:X-Auth-Info:Received:Received:From:To:Cc:Subject:References:X-Yow:Date:In-Reply-To:Message-ID:User-Agent:MIME-Version:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=fj1+bcqMmQnh46cHeNqPNoVa8gopR8AEtBVJCh72z/MSqL8EUHM+k0aFyQCAwh r5FAiO8j1pDOCPVKyPRdFrPIe0+Htu1JjhWuq/a0grauyRiL9zgFgMGWxWwqlnBt 2famHinFt+NA9k0zEelYyeBUeB7meg3NKtDFTAkUT5G0g=; Received: (qmail 31114 invoked by alias); 12 Oct 2012 17:09:38 -0000 Received: (qmail 31094 invoked by uid 22791); 12 Oct 2012 17:09:35 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-out.m-online.net (HELO mail-out.m-online.net) (212.18.0.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 12 Oct 2012 17:09:29 +0000 Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3XdbBF6h9cz3hhfC; Fri, 12 Oct 2012 19:09:25 +0200 (CEST) X-Auth-Info: v5E2xr5859bb2rCjuLkV4HxwR1KlHgaGgIsPBGCiozg= Received: from igel.home (ppp-93-104-154-49.dynamic.mnet-online.de [93.104.154.49]) by mail.mnet-online.de (Postfix) with ESMTPA id 3XdbBD6tt9zbbgC; Fri, 12 Oct 2012 19:09:24 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id 33103CA2A4; Fri, 12 Oct 2012 19:09:24 +0200 (CEST) From: Andreas Schwab To: Dodji Seketeli Cc: Jason Merrill , "Joseph S. Myers" , Richard Henderson , GCC Patches Subject: Re: [PATCH] PR 53528 c++/ C++11 Generalized Attribute support References: <501312EF.9060405@redhat.com> <5027342D.8000207@redhat.com> <5035A398.6040701@redhat.com> <87pq5kfyrk.fsf@redhat.com> <50576D3E.8040505@redhat.com> <5058A6FA.2030807@redhat.com> <506E02E8.1000603@redhat.com> <87k3v4f0dk.fsf@redhat.com> X-Yow: Yow! Am I having fun yet? Date: Fri, 12 Oct 2012 19:09:23 +0200 In-Reply-To: <87k3v4f0dk.fsf@redhat.com> (Dodji Seketeli's message of "Sat, 06 Oct 2012 10:52:39 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Dodji Seketeli writes: > diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-52.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-52.C > new file mode 100644 > index 0000000..0f87fd4 > --- /dev/null > +++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-52.C > @@ -0,0 +1,21 @@ > +// { dg-do compile { target c++11 } } > + > +struct A {int i;} a [[gnu::aligned(16)]]; > +struct B {int i;} __attribute__((aligned(16))) b; > + > +int > +main () > +{ > + A aa; > + B bb; > + > + static_assert (sizeof (a) == 4, "sizeof (a) should be 4"); > + static_assert (sizeof (b) == 16, "sizeof (b) should be 16"); > + static_assert (sizeof (aa) == 4, "sizeof (aa) should be 4"); > + static_assert (sizeof (bb) == 16, "sizeof (bb) should be 16"); > + > + static_assert (__alignof__ (a) == 16, "alignof (a) should be 16"); > + static_assert (__alignof__ (b) == 16, "alignof (b) should be 16"); > + static_assert (__alignof__ (aa) == 4, "alignof (aa) should be 4"); > + static_assert (__alignof__ (bb) == 16, "alignof (bb) should be 16"); > +} This fails on m68k. Andreas. * g++.dg/cpp0x/gen-attrs-52.C: Allow alignment of aa to be less than 4. --- gcc/testsuite/g++.dg/cpp0x/gen-attrs-52.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-52.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-52.C index 0f87fd4..08906aa 100644 --- a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-52.C +++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-52.C @@ -16,6 +16,6 @@ main () static_assert (__alignof__ (a) == 16, "alignof (a) should be 16"); static_assert (__alignof__ (b) == 16, "alignof (b) should be 16"); - static_assert (__alignof__ (aa) == 4, "alignof (aa) should be 4"); + static_assert (__alignof__ (aa) <= 4, "alignof (aa) should be <=4"); static_assert (__alignof__ (bb) == 16, "alignof (bb) should be 16"); }