diff options
author | reichelt <reichelt@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-05-22 12:20:41 +0000 |
---|---|---|
committer | reichelt <reichelt@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-05-22 12:20:41 +0000 |
commit | b4b63acbaca889500289ebf6d4d5b96d5813863a (patch) | |
tree | 1abc7d64dcc628ccee0d39cc55fbbd8277065f80 /gcc/c-decl.c | |
parent | b630e3ba047c5424fd165ecc56ae57c38f278688 (diff) | |
download | gcc-b4b63acbaca889500289ebf6d4d5b96d5813863a.tar.gz |
PR c/26818
* c-decl.c (finish_struct): Skip erroneous fields.
* gcc.dg/struct-incompl-1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113975 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 9ece1ce764d..d7362c10896 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) |