This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/48508] ICE in output_die, at dwarf2out.c:11409
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 14 Dec 2011 15:23:18 +0000
- Subject: [Bug lto/48508] ICE in output_die, at dwarf2out.c:11409
- Auto-submitted: auto-generated
- References: <bug-48508-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48508
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |rguenth at gcc dot gnu.org
|gnu.org |
--- Comment #14 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-14 15:23:18 UTC ---
Hm. It seems that unlike the C FE the C++ FE emits new global fndecls for
each block-local extern it encounters. So, for
extern void foo (int);
static void
bar (void)
{
extern void foo (int);
foo (0);
}
int main()
{
extern void foo (int);
bar ();
}
we'll have three FUNCTION_DECLs for the global foo, two queued in
BLOCK_VARS but with global context (the C FE would have a DECL_CONTEXT
of the enclosing function declaration, bar and main here). So the C++
frontend will be still susceptible to PR48437, those local decls entering
the decl merging process.
Which means that if we fix this bug in another way this bug is fixed
as well! One idea is to simply never treat trees that we output
when following TREE_CHAIN as indexable.