From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2500 invoked by alias); 13 Oct 2015 10:18:42 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 2485 invoked by uid 89); 13 Oct 2015 10:18:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: mx07-00178001.pphosted.com Received: from mx08-00178001.pphosted.com (HELO mx07-00178001.pphosted.com) (91.207.212.93) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 13 Oct 2015 10:18:40 +0000 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.14.5/8.14.5) with SMTP id t9DAGYSJ017233; Tue, 13 Oct 2015 12:18:32 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 1xgck4w7mq-1 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 13 Oct 2015 12:18:32 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id DFACB42; Tue, 13 Oct 2015 10:18:09 +0000 (GMT) Received: from Webmail-eu.st.com (safex1hubcas4.st.com [10.75.90.69]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id B956E5632; Tue, 13 Oct 2015 10:18:29 +0000 (GMT) Received: from [164.129.122.197] (164.129.122.197) by webmail-eu.st.com (10.75.90.13) with Microsoft SMTP Server (TLS) id 8.3.389.2; Tue, 13 Oct 2015 12:18:29 +0200 Subject: Re: [PATCH ARM]: PR67745: Fix function alignment after __attribute__ 2/2 To: Ramana Radhakrishnan , Bernd Schmidt , "law@redhat.com" References: <560A90F2.5010708@st.com> <560C31CD.7060009@redhat.com> <560CDCD7.9080108@st.com> <560D5B36.2020600@st.com> <5614C412.5080400@st.com> <5614F17B.5060402@redhat.com> <5614F7D0.8010409@st.com> <56155841.6000404@redhat.com> <56155B72.4020807@redhat.com> <56166C36.7040600@st.com> <56166DA5.3030909@redhat.com> <561674C1.8030008@st.com> <56167E09.3010502@redhat.com> <561B91DE.5040909@st.com> <561CBAB7.7080104@foss.arm.com> CC: "gcc-patches@gcc.gnu.org" , "Ramana.Radhakrishnan@arm.com" , "kyrylo.tkachov@arm.com" , "richard.earnshaw@arm.com" From: Christian Bruel X-No-Archive: yes Message-ID: <561CDA74.3070302@st.com> Date: Tue, 13 Oct 2015 10:18:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <561CBAB7.7080104@foss.arm.com> Content-Type: multipart/mixed; boundary="------------030708090707060703050000" X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.14.151,1.0.33,0.0.0000 definitions=2015-10-13_11:2015-10-13,2015-10-13,1970-01-01 signatures=0 X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg01206.txt.bz2 --------------030708090707060703050000 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Content-length: 710 Hi Ramana, On 10/13/2015 10:03 AM, Ramana Radhakrishnan wrote: > >> >> yes I see, I was hoping to avoid a new hook, but as you said it seems mandatory for the mere declaration case. >> >> Here is one proposal, it defaults to nothing and the ARM implementation does not need to handle the vptr bit setting. so that simplifies a lot the things. >> >> The hook is called from rest_of_decl_compilation for mere declarations and allocate_struct_function for definitions. > > > I'm not sure we have testsuite coverage for this - can you add a test or 2 ? there were in the first part of the patch set 1/1 (https://gcc.gnu.org/ml/gcc-patches/2015-09/msg02198.html) Here is another one to test more combinations. --------------030708090707060703050000 Content-Type: text/x-csrc; name="attr-align.c" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="attr-align.c" Content-length: 518 /* PR target/67745 Verify alignment when both attribute optimize and target are used. */ /* { dg-do compile } */ /* { dg-skip-if "" { ! { arm_thumb1_ok || arm_thumb2_ok } } } */ void __attribute__ ((target ("arm"))) bar() { } void __attribute__ ((target ("thumb"))) __attribute__ ((optimize ("Os"))) foo() { } void __attribute__ ((target ("thumb"))) __attribute__ ((optimize ("O2"))) rab() { } /* { dg-final { scan-assembler-times ".align\[ \t]2" 2 } } */ /* { dg-final { scan-assembler ".align\[ \t]1" } } */ --------------030708090707060703050000--