Commit 4271a6f3 by Volker Reichelt Committed by Volker Reichelt

re PR c/26818 (tree check: expected class ‘type’, have ‘exceptional’…

re PR c/26818 (tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in finish_struct, at c-decl.c:5350 (time.c))

	PR c/26818
	* c-decl.c (finish_struct): Skip erroneous fields.

	* gcc.dg/struct-incompl-1.c: New test.

From-SVN: r113975
parent 055c00f1
2006-05-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c/26818
* c-decl.c (finish_struct): Skip erroneous fields.
2006-05-22 Nick Clifton <nickc@redhat.com>
* config/cris/cris.opt (march): Remove VarExists attribute.
......
......@@ -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)
......
2006-05-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c/26818
* gcc.dg/struct-incompl-1.c: New test.
2006-05-22 Richard Guenther <rguenther@suse.de>
PR testsuite/27708
/* PR c/26818 */
/* { dg-do compile } */
struct __attribute__ ((packed)) A
{
struct B b; /* { dg-error "incomplete" } */
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment