This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/61848] [5 Regression] a previous declaration causes the section attribute to be lost
- From: "amodra at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 12 Sep 2014 14:57:05 +0000
- Subject: [Bug middle-end/61848] [5 Regression] a previous declaration causes the section attribute to be lost
- Auto-submitted: auto-generated
- References: <bug-61848-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61848
Alan Modra <amodra at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |amodra at gmail dot com
--- Comment #10 from Alan Modra <amodra at gmail dot com> ---
Created attachment 33480
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33480&action=edit
A different approach to fixing this bug
I was playing with this one today, before I found your bugzilla Andrew. It has
been regression tested on x86_64, fixes the loss of section attributes, and
builds a 3.16 x86_64 defconfig kernel - haven't checked if it boots yet..
Adds a fix for C++ which has the same problem as C. (The s/olddecl/newdecl/
lines are because "if (TREE_CODE (newdecl) == FUNCTION_DECL) ... else switch
(TREE_CODE (olddecl))" looks horrible. Cosmetic really since we exit the
function before this code if TREE_CODE (newdecl) != TREE_CODE (olddecl).)