From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16641 invoked by alias); 12 Aug 2014 16:01:47 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 16610 invoked by uid 48); 12 Aug 2014 16:01:43 -0000 From: "jgreenhalgh at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/62108] New: Resolution of mismatched __attribute__ ((__section__ (""))) changes between 4.9 and 4.10. Date: Tue, 12 Aug 2014 16:01:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 4.10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jgreenhalgh at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-08/txt/msg00782.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62108 Bug ID: 62108 Summary: Resolution of mismatched __attribute__ ((__section__ (""))) changes between 4.9 and 4.10. Product: gcc Version: 4.10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: jgreenhalgh at gcc dot gnu.org In this testcase: void func(void); void __attribute__((__section__("bar"))) func (void) { } There is a mismatch between the section attribute given to the prototype (none, so ".text") and the definition ("bar") of func. Compiling this testcase with a 4.9 and a 4.10 compiler using gcc test.c -c and dumping with objdump -x Gives different results between 4.9.1 (4.9.1 release) and 4.10.0 (20140803 (experimental)): $ objdump -x 4.9.o | grep func 0000000000000000 g F bar 0000000000000006 func $ objdump -x 4.10.o | grep func 0000000000000000 g F .text 0000000000000007 func This trips up an ARM kernel build. We should either error on the mismatch, provide a consistent behaviour, or document the change if this is expected.