Commit 1a494ab5 by Paolo Carlini

re PR c++/30298 (ICE with duplicate broken inheritance)

/cp
2010-05-20  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/30298
	* decl.c (xref_basetypes): Return false in case of ill-formed
	redefinition.

/testsuite
2010-05-20  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/30298
	* g++.dg/inherit/crash1.C: New.
	* g++.dg/inherit/crash2.C: Likewise.

From-SVN: r159637
parent 953c29f7
2010-05-20 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/30298
* decl.c (xref_basetypes): Return false in case of ill-formed
redefinition.
2010-05-19 Jason Merrill <jason@redhat.com>
* call.c (reference_binding): Use cp_build_qualified_type_real
......
......@@ -11025,7 +11025,12 @@ xref_basetypes (tree ref, tree base_list)
/* The binfo slot should be empty, unless this is an (ill-formed)
redefinition. */
gcc_assert (!TYPE_BINFO (ref) || TYPE_SIZE (ref));
if (TYPE_BINFO (ref) && !TYPE_SIZE (ref))
{
error ("redefinition of %q#T", ref);
return false;
}
gcc_assert (TYPE_MAIN_VARIANT (ref) == ref);
binfo = make_tree_binfo (max_bases);
......
2010-05-20 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/30298
* g++.dg/inherit/crash1.C: New.
* g++.dg/inherit/crash2.C: Likewise.
2010-05-20 Jakub Jelinek <jakub@redhat.com>
PR debug/44178
......@@ -6,7 +12,8 @@
2010-05-20 Changpeng Fang <changpeng.fang@amd.com>
PR middle-end/44185
* gcc.dg/tree-ssa/prefetch-6.c: Add --param min-insn-to-prefetch-ratio=6.
* gcc.dg/tree-ssa/prefetch-6.c: Add
--param min-insn-to-prefetch-ratio=6.
* gcc.dg/tree-ssa/prefetch-7.c: Remove --param max-unrolled-insns=1 to
allow unrolling, and adjust the movnti count.
......
// PR c++/30298
union A {};
struct B : A {}; // { dg-error "fails to be a struct or class type" }
struct B : A {}; // { dg-error "redefinition" }
// PR c++/30298
struct A {};
struct B : A, A {}; // { dg-error "duplicate base type" }
struct B : A, A {}; // { dg-error "redefinition" }
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