From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5201 invoked by alias); 7 Oct 2015 17:40:06 -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 5187 invoked by uid 89); 7 Oct 2015 17:40:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 07 Oct 2015 17:40:03 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 7317E2F90FB; Wed, 7 Oct 2015 17:40:02 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-105.phx2.redhat.com [10.3.113.105]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t97He1wU032191; Wed, 7 Oct 2015 13:40:01 -0400 Subject: Re: [PATCH ARM]: PR67745: Fix function alignment after __attribute__ 2/2 To: Christian Bruel References: <560A90F2.5010708@st.com> <560C31CD.7060009@redhat.com> <560CDCD7.9080108@st.com> <560D5B36.2020600@st.com> <5614C412.5080400@st.com> Cc: gcc-patches@gcc.gnu.org, Ramana.Radhakrishnan@arm.com, kyrylo.tkachov@arm.com, richard.earnshaw@arm.com From: Jeff Law Message-ID: <561558F1.9030208@redhat.com> Date: Wed, 07 Oct 2015 17:40:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <5614C412.5080400@st.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg00740.txt.bz2 On 10/07/2015 01:04 AM, Christian Bruel wrote: > The ARM target can switch different alignment requirements between the > thumb or arm, thanks to the attribute ((target)). Using > FUNCTION_BOUNDARY that now depends on the switchable target_flag. > > The previous attempt to fix this was to use the set_current_function > hook to reset DECL_ALIGN. On a second thought I found this not > satisfactory because this hook is called multiple time between passes, > whereas the setting only needs to be done once. > > Instead, this patch resets the function's DECL_ALIGN in > allocate_struct_function, when not enforced by the user or the language, > after the attributes are processed. > > Tested for arm-none-eabi (with the 1/2 part > https://gcc.gnu.org/ml/gcc-patches/2015-09/msg02198.html) > > Bootstraped for x86_64-unknown-linux-gnu and tested (c+,c++,fortran) > > Comments ? OK for trunk ? Bernd seems pretty engaged at this point. I'll just add I like this much more than the prior approaches. jeff