Commit 7614d42c by Jakub Jelinek Committed by Jakub Jelinek

re PR c++/60572 (ICE deriving from class with invalid member)

	PR c++/60572
	* init.c (build_zero_init_1): Ignore fields with error_mark_node
	type.

	* g++.dg/init/pr60572.C: New test.

From-SVN: r208734
parent 207c82c4
2014-03-20 Jakub Jelinek <jakub@redhat.com>
PR c++/60572
* init.c (build_zero_init_1): Ignore fields with error_mark_node
type.
2014-03-19 Paolo Carlini <paolo.carlini@oracle.com> 2014-03-19 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51474 PR c++/51474
......
...@@ -192,6 +192,9 @@ build_zero_init_1 (tree type, tree nelts, bool static_storage_p, ...@@ -192,6 +192,9 @@ build_zero_init_1 (tree type, tree nelts, bool static_storage_p,
if (TREE_CODE (field) != FIELD_DECL) if (TREE_CODE (field) != FIELD_DECL)
continue; continue;
if (TREE_TYPE (field) == error_mark_node)
continue;
/* Don't add virtual bases for base classes if they are beyond /* Don't add virtual bases for base classes if they are beyond
the size of the current field, that means it is present the size of the current field, that means it is present
somewhere else in the object. */ somewhere else in the object. */
......
2014-03-20 Jakub Jelinek <jakub@redhat.com>
PR c++/60572
* g++.dg/init/pr60572.C: New test.
2014-03-20 Zhenqiang Chen <zhenqiang.chen@linaro.org> 2014-03-20 Zhenqiang Chen <zhenqiang.chen@linaro.org>
* gcc.target/arm/neon-modes-3.c: Add "-g" option. * gcc.target/arm/neon-modes-3.c: Add "-g" option.
......
// PR c++/60572
// { dg-do compile }
struct A
{
A x; // { dg-error "incomplete type" }
virtual ~A () {}
};
struct B : A
{
B () : A () {}
};
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