This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/49887] New: [4.7 regression] .debug_macro breaks many Solaris/SPARC tests
- From: "ro at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 28 Jul 2011 14:17:45 +0000
- Subject: [Bug debug/49887] New: [4.7 regression] .debug_macro breaks many Solaris/SPARC tests
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49887
Summary: [4.7 regression] .debug_macro breaks many
Solaris/SPARC tests
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: debug
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: ro@gcc.gnu.org
CC: jakub@gcc.gnu.org
Host: sparc-sun-solaris2.11
Target: sparc-sun-solaris2.11
Build: sparc-sun-solaris2.11
A recent Solaris 11/SPARC bootstrap with Sun as showed many testsuite
regressions:
a considerable number of them were gcc.dg/debug and g++.dg/debug tests at
-gdwarf-2 -g3, but only with Sun as:
FAIL: gcc.dg/debug/20020220-1.c -gdwarf-2 -g3 (test for excess errors)
Excess errors:
Undefined first referenced
symbol in file
wm4.0.a88b226d1d8abb1951fbf09c0af98055 /var/tmp//ccV4aG6a.o
The failure vanishes with -save-temps, so I had to provide an unlink.so
that just returns success to capture the output files. It turns out that
in a regular compile, I've got this section in 20020220-1.s:
.section ".debug_macro"
.LLdebug_macro0:
.uahalf 0x4
.byte 0x2
.uaword .LLdebug_line0
.byte 0x7
.uaword .LLdebug_macro1
.byte 0x3
.byte 0
.byte 0x1
.byte 0x4
.byte 0
.section ".debug_macro%wm4.0.a88b226d1d8abb1951fbf09c0af98055"
.group
wm4.0.a88b226d1d8abb1951fbf09c0af98055,".debug_macro%wm4.0.a88b226d1d8abb1951fbf09c0af98055",#comdat
.LLdebug_macro1:
but the group signature symbol isn't emitted, which leads to the undefined
symbol:
> elfdump -g 20020220-1.broken.o
Group Section: .group%wm4.0.a88b226d1d8abb1951fbf09c0af98055
index flags / section signature symbol
[0] [ COMDAT ] wm4.0.a88b226d1d8abb1951fbf09c0af98055
[1] .debug_macro%wm4.0.a88b226d1d8abb1951fbf09c0af98055 [10]
$ nm 20020220-1.o
20020220-1.broken.o:
[Index] Value Size Type Bind Other Shndx Name
[4] | 0| 0|SECT |LOCL |0 |6 |
[7] | 0| 0|SECT |LOCL |0 |2 |
[8] | 0| 0|SECT |LOCL |0 |4 |
[10] | 0| 0|SECT |LOCL |0 |12 |
[11] | 0| 0|SECT |LOCL |0 |7 |
[12] | 0| 0|SECT |LOCL |0 |3 |
[2] | 0| 0|SECT |LOCL |0 |10 |
[3] | 0| 0|SECT |LOCL |0 |9 |
[9] | 0| 0|SECT |LOCL |0 |11 |
[5] | 0| 0|SECT |LOCL |0 |5 |
[6] | 0| 0|SECT |LOCL |0 |8 |
[1] | 0| 0|FILE |LOCL |0 |ABS |20020220-1.c
[13] | 16| 400|FUNC |GLOB |0 |2 |bar
[14] | 0| 16|FUNC |GLOB |0 |2 |foo
[15] | 416| 20|FUNC |GLOB |0 |2 |main
[16] | 0| 0|NOTY |GLOB |0 |UNDEF
|wm4.0.a88b226d1d8abb1951fbf09c0af98055
I still need to find out why this only happens on SPARC, but on x86 even with
Sun as all is fine.
Rainer