diff options
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 43a6bc3..95ae8eb 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -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); |