* [Bug debug/53471] [4.8 LTO] ICE in pp_base_format, at pretty-print.c:510 (-flto -g)
2012-05-24 10:49 [Bug debug/53471] New: [4.8 LTO] ICE in pp_base_format, at pretty-print.c:510 (-flto -g) vincenzo.innocente at cern dot ch
@ 2012-05-24 17:13 ` hjl.tools at gmail dot com
2012-05-24 17:16 ` [Bug lto/53471] [4.7/4.8 Regression] " hjl.tools at gmail dot com
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: hjl.tools at gmail dot com @ 2012-05-24 17:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53471
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-05-24
CC| |rguenth at gcc dot gnu.org
Target Milestone|--- |4.8.0
Ever Confirmed|0 |1
--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2012-05-24 17:07:47 UTC ---
It is caused by revision 182479:
http://gcc.gnu.org/ml/gcc-cvs/2011-12/msg00618.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/53471] [4.7/4.8 Regression] ICE in pp_base_format, at pretty-print.c:510 (-flto -g)
2012-05-24 10:49 [Bug debug/53471] New: [4.8 LTO] ICE in pp_base_format, at pretty-print.c:510 (-flto -g) vincenzo.innocente at cern dot ch
2012-05-24 17:13 ` [Bug debug/53471] " hjl.tools at gmail dot com
@ 2012-05-24 17:16 ` hjl.tools at gmail dot com
2012-05-29 14:20 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: hjl.tools at gmail dot com @ 2012-05-24 17:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53471
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|debug |lto
Target Milestone|4.8.0 |4.7.1
Summary|[4.8 LTO] ICE in |[4.7/4.8 Regression] ICE in
|pp_base_format, at |pp_base_format, at
|pretty-print.c:510 (-flto |pretty-print.c:510 (-flto
|-g) |-g)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/53471] [4.7/4.8 Regression] ICE in pp_base_format, at pretty-print.c:510 (-flto -g)
2012-05-24 10:49 [Bug debug/53471] New: [4.8 LTO] ICE in pp_base_format, at pretty-print.c:510 (-flto -g) vincenzo.innocente at cern dot ch
2012-05-24 17:13 ` [Bug debug/53471] " hjl.tools at gmail dot com
2012-05-24 17:16 ` [Bug lto/53471] [4.7/4.8 Regression] " hjl.tools at gmail dot com
@ 2012-05-29 14:20 ` rguenth at gcc dot gnu.org
2012-05-30 15:04 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-05-29 14:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53471
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |rguenth at gcc dot gnu.org
|gnu.org |
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-29 14:18:35 UTC ---
Mine.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/53471] [4.7/4.8 Regression] ICE in pp_base_format, at pretty-print.c:510 (-flto -g)
2012-05-24 10:49 [Bug debug/53471] New: [4.8 LTO] ICE in pp_base_format, at pretty-print.c:510 (-flto -g) vincenzo.innocente at cern dot ch
` (2 preceding siblings ...)
2012-05-29 14:20 ` rguenth at gcc dot gnu.org
@ 2012-05-30 15:04 ` rguenth at gcc dot gnu.org
2012-06-04 13:19 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-05-30 15:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53471
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-30 14:59:26 UTC ---
On the 4.7 branch I get this ICE triggered from
#1 0x000000000070af4f in comptypes (t1=0x7ffff2a4c3f0, t2=0x7ffff2dfab28,
strict=0) at /space/rguenther/src/svn/gcc-4_7-branch/gcc/cp/typeck.c:1393
1393 ("canonical types differ for identical types %T and %T",
thus another ICE. It happens because we call decl_assembler_name from
dwarf2out_finish, something we shouldn't do with the frontend langhooks
still in place.
#13 0x0000000000a6543f in dwarf2out_finish (filename=0x7fffffffe379 "t.ii")
at /space/rguenther/src/svn/gcc-4_7-branch/gcc/dwarf2out.c:22585
22585 if (DECL_ASSEMBLER_NAME (decl) != DECL_NAME (decl))
(gdb) l
22580 move_marked_base_types ();
22581
22582 for (node = deferred_asm_name; node; node = node->next)
22583 {
22584 tree decl = node->created_for;
22585 if (DECL_ASSEMBLER_NAME (decl) != DECL_NAME (decl))
22586 {
22587 add_linkage_attr (node->die, decl);
22588 move_linkage_attr (node->die);
22589 }
that's a general issue though. The issue is, this is a FUNCTION_DECL,
it qualifies for need_assembler_name_p but it doesn't have it set. Thus,
in
static void
free_lang_data_in_cgraph (void)
{
...
/* Find decls and types in the body of every function in the callgraph. */
for (n = cgraph_nodes; n; n = n->next)
find_decls_types_in_node (n, &fld);
...
/* Set the assembler name on every decl found. We need to do this
now because free_lang_data_in_decl will invalidate data needed
for mangling. This breaks mangling on interdependent decls. */
FOR_EACH_VEC_ELT (tree, fld.decls, i, t)
assign_assembler_name_if_neeeded (t);
we do not come along this FUNCTION_DECL. dwarf2out.c reaches it via
TYPE_METHODS which we clear. So we do not reach that type in walking
all types in free-lang-data. dwarf2out.c comes along it via
#12 0x0000000000d499d1 in rest_of_type_compilation (type=0x7ffff2e001f8,
toplev=1) at /space/rguenther/src/svn/gcc-4_7-branch/gcc/passes.c:238
238 debug_hooks->type_decl (TYPE_STUB_DECL (type), !toplev);
(gdb) l
233 errors. */
234 if (seen_error ())
235 return;
236
237 timevar_push (TV_SYMOUT);
238 debug_hooks->type_decl (TYPE_STUB_DECL (type), !toplev);
(gdb) up
#13 0x000000000065d4d0 in finish_struct_1 (t=0x7ffff2e001f8)
at /space/rguenther/src/svn/gcc-4_7-branch/gcc/cp/class.c:6133
6133 rest_of_type_compilation (t, ! LOCAL_CLASS_P (t));
thus explicitely pushes it.
I suppose rest_of_type_compilation could queue the type in a list later
processed by free-lang-data. Or we should not defer computation of
DECL_ASSEMBLER_NAME in dwarf2out.c here. Which I would like more.
Jason - do you remember why we do that?
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/53471] [4.7/4.8 Regression] ICE in pp_base_format, at pretty-print.c:510 (-flto -g)
2012-05-24 10:49 [Bug debug/53471] New: [4.8 LTO] ICE in pp_base_format, at pretty-print.c:510 (-flto -g) vincenzo.innocente at cern dot ch
` (3 preceding siblings ...)
2012-05-30 15:04 ` rguenth at gcc dot gnu.org
@ 2012-06-04 13:19 ` rguenth at gcc dot gnu.org
2012-06-04 13:24 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-06-04 13:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53471
--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-06-04 13:19:23 UTC ---
Author: rguenth
Date: Mon Jun 4 13:19:17 2012
New Revision: 188181
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188181
Log:
2012-06-04 Richard Guenther <rguenther@suse.de>
PR middle-end/53471
* dwarf2out.c (dwarf2out_finish): If generating LTO do not
create new assembler names.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/dwarf2out.c
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/53471] [4.7/4.8 Regression] ICE in pp_base_format, at pretty-print.c:510 (-flto -g)
2012-05-24 10:49 [Bug debug/53471] New: [4.8 LTO] ICE in pp_base_format, at pretty-print.c:510 (-flto -g) vincenzo.innocente at cern dot ch
` (4 preceding siblings ...)
2012-06-04 13:19 ` rguenth at gcc dot gnu.org
@ 2012-06-04 13:24 ` rguenth at gcc dot gnu.org
2012-06-04 13:25 ` rguenth at gcc dot gnu.org
2012-06-04 13:25 ` rguenth at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-06-04 13:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53471
--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-06-04 13:24:30 UTC ---
Author: rguenth
Date: Mon Jun 4 13:24:24 2012
New Revision: 188182
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188182
Log:
2012-06-04 Richard Guenther <rguenther@suse.de>
PR middle-end/53471
* dwarf2out.c (dwarf2out_finish): If generating LTO do not
create new assembler names.
Modified:
branches/gcc-4_7-branch/gcc/ChangeLog
branches/gcc-4_7-branch/gcc/dwarf2out.c
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/53471] [4.7/4.8 Regression] ICE in pp_base_format, at pretty-print.c:510 (-flto -g)
2012-05-24 10:49 [Bug debug/53471] New: [4.8 LTO] ICE in pp_base_format, at pretty-print.c:510 (-flto -g) vincenzo.innocente at cern dot ch
` (5 preceding siblings ...)
2012-06-04 13:24 ` rguenth at gcc dot gnu.org
@ 2012-06-04 13:25 ` rguenth at gcc dot gnu.org
2012-06-04 13:25 ` rguenth at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-06-04 13:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53471
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-06-04 13:24:30 UTC ---
Author: rguenth
Date: Mon Jun 4 13:24:24 2012
New Revision: 188182
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188182
Log:
2012-06-04 Richard Guenther <rguenther@suse.de>
PR middle-end/53471
* dwarf2out.c (dwarf2out_finish): If generating LTO do not
create new assembler names.
Modified:
branches/gcc-4_7-branch/gcc/ChangeLog
branches/gcc-4_7-branch/gcc/dwarf2out.c
--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-06-04 13:24:54 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/53471] [4.7/4.8 Regression] ICE in pp_base_format, at pretty-print.c:510 (-flto -g)
2012-05-24 10:49 [Bug debug/53471] New: [4.8 LTO] ICE in pp_base_format, at pretty-print.c:510 (-flto -g) vincenzo.innocente at cern dot ch
` (6 preceding siblings ...)
2012-06-04 13:25 ` rguenth at gcc dot gnu.org
@ 2012-06-04 13:25 ` rguenth at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-06-04 13:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53471
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-06-04 13:24:54 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 9+ messages in thread