From: Steve Ellcey Date: Thu, 20 Jul 2006 17:46:57 +0000 (+0000) Subject: re PR c++/27495 (ICE using "." instead of "->") X-Git-Tag: releases/gcc-4.0.4~513 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66c9e9ced202815559bc17930dde2ebbdfe35b43;p=thirdparty%2Fgcc.git re PR c++/27495 (ICE using "." instead of "->") PR c++/27495 * search.c (adjust_result_of_qualified_name_lookup): Change assert to part of if statement. * g++.dg/other/pr27495.C: New. From-SVN: r115627 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index babd2f41d73d..6ecba8ae9bc5 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2006-07-20 Steve Ellcey + + PR c++/27495 + * search.c (adjust_result_of_qualified_name_lookup): Change + assert to part of if statement. + 2006-07-18 Steve Ellcey PR c++/28304 diff --git a/gcc/cp/search.c b/gcc/cp/search.c index ef0f82eefeb9..aed8a7aeb0b1 100644 --- a/gcc/cp/search.c +++ b/gcc/cp/search.c @@ -1484,14 +1484,13 @@ adjust_result_of_qualified_name_lookup (tree decl, tree context_class) { if (context_class && context_class != error_mark_node + && CLASS_TYPE_P (context_class) && CLASS_TYPE_P (qualifying_scope) && DERIVED_FROM_P (qualifying_scope, context_class) && BASELINK_P (decl)) { tree base; - gcc_assert (CLASS_TYPE_P (context_class)); - /* Look for the QUALIFYING_SCOPE as a base of the CONTEXT_CLASS. Because we do not yet know which function will be chosen by overload resolution, we cannot yet check either accessibility diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5f15fb089d56..d0fb7afb00f7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2006-07-20 Steve Ellcey + + PR c++/27495 + * g++.dg/other/pr27495.C: New. + 2006-07-18 Steve Ellcey PR c++/28304 diff --git a/gcc/testsuite/g++.dg/other/pr27495.C b/gcc/testsuite/g++.dg/other/pr27495.C new file mode 100644 index 000000000000..990b1ee5eceb --- /dev/null +++ b/gcc/testsuite/g++.dg/other/pr27495.C @@ -0,0 +1,8 @@ + +// Test to make sure we do not ICE on this invalid program. + +struct A +{ + template void foo(); + void bar() { this.A::foo<0>(); } // { dg-error "" } +};