This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/68408] New: sparc-elf, c++: broken support for attribute init_priority.


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"

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]