This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/68408] New: sparc-elf, c++: broken support for attribute init_priority.
- From: "sorganov at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 18 Nov 2015 11:31:13 +0000
- Subject: [Bug target/68408] New: sparc-elf, c++: broken support for attribute init_priority.
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68408
Bug ID: 68408
Summary: sparc-elf, c++: broken support for attribute
init_priority.
Product: gcc
Version: 5.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: sorganov at gmail dot com
Target Milestone: ---
g++ at version 5.2.1 for sparc-elf misses proper support for attribute
init_priority: resulting ".ctors" section does not have priority number
appended to its name as it should be:
$ cat init-priority.cc
struct A { A() {} } a __attribute__ ((init_priority(365)));
$ ~/try/sparc-elf-5.2.0/bin/sparc-elf-g++ -c -Wa,-ahdl -save-temps
init-priority.cc -o /dev/null | grep ctors
83 .section ".ctors",#alloc,#write
g++ 3.4.4 on the same target correctly gives:
$ /opt/sparc-elf-3.4.4//bin/sparc-elf-g++ -c -Wa,-ahdl -save-temps
init-priority.cc -o /dev/null | grep ctors
73 .section ".ctors.65170",#alloc,#write
g++ 5.2.1 on x86 target also correctly gives:
$ ~/try/gcc-5.2.0/bin/g++ -c -Wa,-ahdl -save-temps init-priority.cc -o
/dev/null | grep init_array
75 .section .init_array.00365,"aw"