re PR c++/19963 (ICE on invalid member declaration)

PR c++/19963
	* class.c (layout_class_type): Skip fields with invalid types.

	* g++.dg/other/incomplete2.C: New test.

From-SVN: r113220
This commit is contained in:
Volker Reichelt 2006-04-24 08:38:05 +00:00 committed by Volker Reichelt
parent c0a3f887e5
commit 4e3bd7d561
4 changed files with 26 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2006-04-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/19963
* class.c (layout_class_type): Skip fields with invalid types.
2006-04-23 Mark Mitchell <mark@codesourcery.com>
PR c++/26912

View File

@ -4607,6 +4607,8 @@ layout_class_type (tree t, tree *virtuals_p)
}
type = TREE_TYPE (field);
if (type == error_mark_node)
continue;
padding = NULL_TREE;

View File

@ -1,3 +1,8 @@
2006-04-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/19963
* g++.dg/other/incomplete2.C: New test.
2006-04-24 Richard Guenther <rguenther@suse.de>
PR middle-end/26869

View File

@ -0,0 +1,14 @@
// PR c++/19963
// { dg-do compile }
struct A;
struct B
{
A a : 1; // { dg-error "incomplete" }
};
struct S
{
S : 1; // { dg-error "incomplete" }
};