From 0f19e7adef3f2818fd0b363306791c23b0656b62 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Tue, 14 Apr 2015 11:29:34 -0400 Subject: re PR c++/65721 (Internal compiler error segmentation fault) PR c++/65721 * name-lookup.c (do_class_using_decl): Complain about specifying the current class even if there are dependent bases. From-SVN: r222096 --- gcc/cp/ChangeLog | 6 ++++++ gcc/cp/name-lookup.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'gcc/cp') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 10df58f..03f6f2a4 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2015-04-14 Jason Merrill + + PR c++/65721 + * name-lookup.c (do_class_using_decl): Complain about specifying + the current class even if there are dependent bases. + 2015-04-14 David Krauss PR c++/59766 diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index e3f7cca..9e4e0e3 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -3408,7 +3408,7 @@ do_class_using_decl (tree scope, tree name) tf_warning_or_error); if (b_kind < bk_proper_base) { - if (!bases_dependent_p) + if (!bases_dependent_p || b_kind == bk_same_type) { error_not_base_type (scope, current_class_type); return NULL_TREE; -- cgit v1.1