aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2015-04-14 11:29:34 -0400
committerJason Merrill <jason@gcc.gnu.org>2015-04-14 11:29:34 -0400
commit0f19e7adef3f2818fd0b363306791c23b0656b62 (patch)
treef9ada431677cd0ac0ee688c4c08a73eaee87b231 /gcc/cp
parent688e531e4b84d9250646715658179a5f72753609 (diff)
downloadgcc-0f19e7adef3f2818fd0b363306791c23b0656b62.zip
gcc-0f19e7adef3f2818fd0b363306791c23b0656b62.tar.gz
gcc-0f19e7adef3f2818fd0b363306791c23b0656b62.tar.bz2
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
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/name-lookup.c2
2 files changed, 7 insertions, 1 deletions
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 <jason@redhat.com>
+
+ 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 <david_work@me.com>
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;