[Bug debug/17389] [4.0 Regression] ICE in dwarf2out_finish, at dwarf2out.c:13566
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Sep 10 07:49:00 GMT 2004
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-09-10 07:49 -------
I don't know if this is wrong or not but I have been dinking so:
@@ -13632,25 +13544,28 @@ dwarf2out_finish (const char *filename)
else if (errorcount > 0 || sorrycount > 0)
/* It's OK to be confused by errors in the input. */
add_child_die (comp_unit_die, die);
- else if (node->created_for
- && ((DECL_P (node->created_for)
- && (context = DECL_CONTEXT (node->created_for)))
- || (TYPE_P (node->created_for)
- && (context = TYPE_CONTEXT (node->created_for))))
- && TREE_CODE (context) == FUNCTION_DECL)
+ else
{
/* In certain situations, the lexical block containing a
nested function can be optimized away, which results
in the nested function die being orphaned. Likewise
with the return type of that nested function. Force
this to be a child of the containing function. */
+ tree context = NULL_TREE;
+
+ gcc_assert (node->created_for);
+
+ if (DECL_P (node->created_for))
+ context = DECL_CONTEXT (node->created_for);
+ else if (TYPE_P (node->created_for))
+ context = TYPE_CONTEXT (node->created_for);
+
+ gcc_assert (context && TREE_CODE (context) == FUNCTION_DECL); <-- this
+
origin = lookup_decl_die (context);
- if (! origin)
- abort ();
+ gcc_assert (origin);
add_child_die (origin, die);
}
- else
- abort ();
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |critical
Keywords| |ice-on-valid-code
Summary|ICE in dwarf2out_finish, at |[4.0 Regression] ICE in
|dwarf2out.c:13566 |dwarf2out_finish, at
| |dwarf2out.c:13566
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17389
More information about the Gcc-bugs
mailing list