Don't crash on reference to field with erroneous type.
From-SVN: r169027
This commit is contained in:
parent
3e03217e07
commit
e76efdbd96
|
@ -9988,6 +9988,8 @@ Field_reference_expression::do_get_tree(Translate_context* context)
|
|||
field = DECL_CHAIN(field);
|
||||
gcc_assert(field != NULL_TREE);
|
||||
}
|
||||
if (TREE_TYPE(field) == error_mark_node)
|
||||
return error_mark_node;
|
||||
return build3(COMPONENT_REF, TREE_TYPE(field), struct_tree, field,
|
||||
NULL_TREE);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue