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
This commit is contained in:
parent
953c29f73e
commit
1a494ab5a5
5 changed files with 32 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
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);
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
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.
|
||||
|
||||
|
|
6
gcc/testsuite/g++.dg/inherit/crash1.C
Normal file
6
gcc/testsuite/g++.dg/inherit/crash1.C
Normal file
|
@ -0,0 +1,6 @@
|
|||
// PR c++/30298
|
||||
|
||||
union A {};
|
||||
|
||||
struct B : A {}; // { dg-error "fails to be a struct or class type" }
|
||||
struct B : A {}; // { dg-error "redefinition" }
|
6
gcc/testsuite/g++.dg/inherit/crash2.C
Normal file
6
gcc/testsuite/g++.dg/inherit/crash2.C
Normal file
|
@ -0,0 +1,6 @@
|
|||
// PR c++/30298
|
||||
|
||||
struct A {};
|
||||
|
||||
struct B : A, A {}; // { dg-error "duplicate base type" }
|
||||
struct B : A, A {}; // { dg-error "redefinition" }
|
Loading…
Add table
Reference in a new issue