public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/49887] New: [4.7 regression] .debug_macro breaks many Solaris/SPARC tests
@ 2011-07-28 14:18 ro at gcc dot gnu.org
2011-07-28 14:46 ` [Bug debug/49887] " jakub at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: ro at gcc dot gnu.org @ 2011-07-28 14:18 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug debug/49887] [4.7 regression] .debug_macro breaks many Solaris/SPARC tests
2011-07-28 14:18 [Bug debug/49887] New: [4.7 regression] .debug_macro breaks many Solaris/SPARC tests ro at gcc dot gnu.org
@ 2011-07-28 14:46 ` jakub at gcc dot gnu.org
2011-07-28 14:53 ` ro at CeBiTec dot Uni-Bielefeld.DE
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-07-28 14:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49887
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-07-28 14:45:11 UTC ---
So, how are the group signature symbols supposed to be emitted on
SPARC/Solaris? A dummy symbol of that name somewhere in the section? Can it
be local, or must it be global symbol?
Would something like:
--- gcc/dwarf2out.c 2011-07-27 23:25:36.000000000 +0200
+++ gcc/dwarf2out.c 2011-07-28 16:43:29.181746188 +0200
@@ -20872,6 +20872,7 @@ output_macinfo (void)
DEBUG_MACRO_SECTION_LABEL,
ref->lineno);
ASM_OUTPUT_LABEL (asm_out_file, label);
+ ASM_OUTPUT_LABEL (asm_out_file, IDENTIFIER_POINTER (comdat_key));
ref->code = 0;
free (CONST_CAST (char *, ref->info));
ref->info = NULL;
fix it? Of course I'd prefer if this was limited to targets where the
assembler isn't capable of handling it correctly...
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug debug/49887] [4.7 regression] .debug_macro breaks many Solaris/SPARC tests
2011-07-28 14:18 [Bug debug/49887] New: [4.7 regression] .debug_macro breaks many Solaris/SPARC tests ro at gcc dot gnu.org
2011-07-28 14:46 ` [Bug debug/49887] " jakub at gcc dot gnu.org
@ 2011-07-28 14:53 ` ro at CeBiTec dot Uni-Bielefeld.DE
2011-07-29 12:59 ` ro at CeBiTec dot Uni-Bielefeld.DE
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2011-07-28 14:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49887
--- Comment #2 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2011-07-28 14:52:35 UTC ---
> --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-07-28 14:45:11 UTC ---
> So, how are the group signature symbols supposed to be emitted on
> SPARC/Solaris? A dummy symbol of that name somewhere in the section? Can it
> be local, or must it be global symbol?
This is usually handled in gcc/config/sol2.c
(solaris_elf_asm_comdat_section, solaris_define_comdat_signature,
solaris_code_end). I haven't yet checked why this doesn't trigger here.
> Would something like:
> --- gcc/dwarf2out.c 2011-07-27 23:25:36.000000000 +0200
> +++ gcc/dwarf2out.c 2011-07-28 16:43:29.181746188 +0200
> @@ -20872,6 +20872,7 @@ output_macinfo (void)
> DEBUG_MACRO_SECTION_LABEL,
> ref->lineno);
> ASM_OUTPUT_LABEL (asm_out_file, label);
> + ASM_OUTPUT_LABEL (asm_out_file, IDENTIFIER_POINTER (comdat_key));
> ref->code = 0;
> free (CONST_CAST (char *, ref->info));
> ref->info = NULL;
> fix it? Of course I'd prefer if this was limited to targets where the
Probably.
> assembler isn't capable of handling it correctly...
Me too: this should be local to the Solaris port if at all possible. I
won't argue if the need to explicitly define the signature symbols is a
bug or just different from gas, though :-)
Rainer
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug debug/49887] [4.7 regression] .debug_macro breaks many Solaris/SPARC tests
2011-07-28 14:18 [Bug debug/49887] New: [4.7 regression] .debug_macro breaks many Solaris/SPARC tests ro at gcc dot gnu.org
2011-07-28 14:46 ` [Bug debug/49887] " jakub at gcc dot gnu.org
2011-07-28 14:53 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2011-07-29 12:59 ` ro at CeBiTec dot Uni-Bielefeld.DE
2011-07-29 13:06 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2011-07-29 12:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49887
--- Comment #3 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2011-07-29 12:58:25 UTC ---
> --- Comment #2 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2011-07-28 14:52:35 UTC ---
>> --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-07-28 14:45:11 UTC ---
>> So, how are the group signature symbols supposed to be emitted on
>> SPARC/Solaris? A dummy symbol of that name somewhere in the section? Can it
>> be local, or must it be global symbol?
>
> This is usually handled in gcc/config/sol2.c
> (solaris_elf_asm_comdat_section, solaris_define_comdat_signature,
> solaris_code_end). I haven't yet checked why this doesn't trigger here.
I see now what's going on: output_macinfo is run from toplev.c (compile_file):
(*debug_hooks->finish) (main_input_filename);
which runs *after*
targetm.asm_out.code_end ();
I've no idea what's a good way to resolve this.
Rainer
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug debug/49887] [4.7 regression] .debug_macro breaks many Solaris/SPARC tests
2011-07-28 14:18 [Bug debug/49887] New: [4.7 regression] .debug_macro breaks many Solaris/SPARC tests ro at gcc dot gnu.org
` (2 preceding siblings ...)
2011-07-29 12:59 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2011-07-29 13:06 ` jakub at gcc dot gnu.org
2011-07-29 16:10 ` ro at CeBiTec dot Uni-Bielefeld.DE
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-07-29 13:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49887
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-07-29 13:06:13 UTC ---
Emit that in targetm.asm_out.file_end () instead?
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug debug/49887] [4.7 regression] .debug_macro breaks many Solaris/SPARC tests
2011-07-28 14:18 [Bug debug/49887] New: [4.7 regression] .debug_macro breaks many Solaris/SPARC tests ro at gcc dot gnu.org
` (3 preceding siblings ...)
2011-07-29 13:06 ` jakub at gcc dot gnu.org
@ 2011-07-29 16:10 ` ro at CeBiTec dot Uni-Bielefeld.DE
2011-08-01 12:15 ` ro at gcc dot gnu.org
2011-08-01 12:16 ` ro at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2011-07-29 16:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49887
--- Comment #5 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2011-07-29 16:10:04 UTC ---
> --- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-07-29 13:06:13 UTC ---
> Emit that in targetm.asm_out.file_end () instead?
Seems to work according to a quick test running gcc.dg/debug/debug.exp.
I'll run it through a full bootstrap cycle on both sparc and x86, as and
gas over the weekend.
I think I had some reason not to use TARGET_ASM_FILE_END for the
COMDAT-with-as patch, but cannot remember what it was.
Thanks.
Rainer
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug debug/49887] [4.7 regression] .debug_macro breaks many Solaris/SPARC tests
2011-07-28 14:18 [Bug debug/49887] New: [4.7 regression] .debug_macro breaks many Solaris/SPARC tests ro at gcc dot gnu.org
` (4 preceding siblings ...)
2011-07-29 16:10 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2011-08-01 12:15 ` ro at gcc dot gnu.org
2011-08-01 12:16 ` ro at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: ro at gcc dot gnu.org @ 2011-08-01 12:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49887
--- Comment #6 from Rainer Orth <ro at gcc dot gnu.org> 2011-08-01 12:14:28 UTC ---
Author: ro
Date: Mon Aug 1 12:14:21 2011
New Revision: 177020
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177020
Log:
PR debug/49887
* config/sol2.c (solaris_code_end): Rename to solaris_file_end.
* config/sol2-protos.h: Likewise.
* config/i386/i386.c (ix86_code_end) [TARGET_SOLARIS]: Don't call
solaris_code_end.
* config/i386/sol2.h [!USE_GAS] (TARGET_ASM_FILE_END): Redefine.
* config/sparc/sparc.c (sparc_file_end) [TARGET_SOLARIS]: Call
solaris_file_end.
* config/sparc/sol2.h (TARGET_ASM_CODE_END): Remove.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.c
trunk/gcc/config/i386/sol2.h
trunk/gcc/config/sol2-protos.h
trunk/gcc/config/sol2.c
trunk/gcc/config/sparc/sol2.h
trunk/gcc/config/sparc/sparc.c
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug debug/49887] [4.7 regression] .debug_macro breaks many Solaris/SPARC tests
2011-07-28 14:18 [Bug debug/49887] New: [4.7 regression] .debug_macro breaks many Solaris/SPARC tests ro at gcc dot gnu.org
` (5 preceding siblings ...)
2011-08-01 12:15 ` ro at gcc dot gnu.org
@ 2011-08-01 12:16 ` ro at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: ro at gcc dot gnu.org @ 2011-08-01 12:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49887
Rainer Orth <ro at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
URL| |http://gcc.gnu.org/ml/gcc-p
| |atches/2011-08/msg00030.htm
| |l
Resolution| |FIXED
AssignedTo|unassigned at gcc dot |ro at gcc dot gnu.org
|gnu.org |
Target Milestone|--- |4.7.0
--- Comment #7 from Rainer Orth <ro at gcc dot gnu.org> 2011-08-01 12:15:58 UTC ---
Fixed for 4.7.0.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-08-01 12:16 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-28 14:18 [Bug debug/49887] New: [4.7 regression] .debug_macro breaks many Solaris/SPARC tests ro at gcc dot gnu.org
2011-07-28 14:46 ` [Bug debug/49887] " jakub at gcc dot gnu.org
2011-07-28 14:53 ` ro at CeBiTec dot Uni-Bielefeld.DE
2011-07-29 12:59 ` ro at CeBiTec dot Uni-Bielefeld.DE
2011-07-29 13:06 ` jakub at gcc dot gnu.org
2011-07-29 16:10 ` ro at CeBiTec dot Uni-Bielefeld.DE
2011-08-01 12:15 ` ro at gcc dot gnu.org
2011-08-01 12:16 ` ro at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).