Now that we call dwarf2out earlier in the compilation process, we may
get some error_mark_node's. And of course, nobody likes an ICE...
Committed to branch.
commit 92437112d3d4966eecb31df59a6fa4a1014a198c
Author: Aldy Hernandez <al...@redhat.com>
Date: Fri Apr 24 14:24:09 2015 -0700
Make gen_typedef_die handle a type of error_mark_node.
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 39046f5..11bbade 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -20617,6 +20617,9 @@ gen_typedef_die (tree decl, dw_die_ref context_die)
{
type = DECL_ORIGINAL_TYPE (decl);
+ if (type == error_mark_node)
+ return;
+
gcc_assert (type != TREE_TYPE (decl));
equate_type_number_to_die (TREE_TYPE (decl), type_die);
}
@@ -20624,6 +20627,9 @@ gen_typedef_die (tree decl, dw_die_ref context_die)
{
type = TREE_TYPE (decl);
+ if (type == error_mark_node)
+ return;
+
if (is_naming_typedef_decl (TYPE_NAME (type)))
{
/* Here, we are in the case of decl being a typedef naming