aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 9ece1ce..d7362c1 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -5396,6 +5396,9 @@ finish_struct (tree t, tree fieldlist, tree attributes)
saw_named_field = 0;
for (x = fieldlist; x; x = TREE_CHAIN (x))
{
+ if (TREE_TYPE (x) == error_mark_node)
+ continue;
+
DECL_CONTEXT (x) = t;
if (TYPE_PACKED (t) && TYPE_ALIGN (TREE_TYPE (x)) > BITS_PER_UNIT)