[Bug middle-end/61848] [5 Regression] a previous declaration causes the section attribute to be lost

amodra at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri Sep 12 23:44:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61848

--- Comment #12 from Alan Modra <amodra at gmail dot com> ---
extern char foo;
char foo __attribute__ ((__section__(".machine.desc")));
char foo __attribute__ ((__section__(".mymachine.desc")));

It looks like we should take out the DECL_SECTION_NAME (olddecl) == NULL
checks.
The above gives no diagnostic with older compilers, and results in section
.mymachine.desc being used.  trunk+patch results in section .machine.desc.



More information about the Gcc-bugs mailing list