re PR c++/32113 (ICE with invalid template parameter)

/cp
2007-08-31  Paolo Carlini  <pcarlini@suse.de>

	PR c++/32113
	* search.c (lookup_member): Check the name argument for
	error_mark_node.

/testsuite
2007-08-31  Paolo Carlini  <pcarlini@suse.de>

	PR c++/32113
	* g++.dg/template/crash70.C: New.

From-SVN: r127966
This commit is contained in:
Paolo Carlini
2007-08-31 09:57:50 +00:00
committed by Paolo Carlini
parent c12a229d49
commit c1fca6dfb7
4 changed files with 21 additions and 0 deletions

View File

@@ -1,3 +1,9 @@
2007-08-31 Paolo Carlini <pcarlini@suse.de>
PR c++/32113
* search.c (lookup_member): Check the name argument for
error_mark_node.
2007-08-29 Nick Clifton <nickc@redhat.com>
* typeck.c: Change copyright header to refer to version 3 of the

View File

@@ -1199,6 +1199,9 @@ lookup_member (tree xbasetype, tree name, int protect, bool want_type)
const char *errstr = 0;
if (name == error_mark_node)
return NULL_TREE;
gcc_assert (TREE_CODE (name) == IDENTIFIER_NODE);
if (TREE_CODE (xbasetype) == TREE_BINFO)

View File

@@ -1,3 +1,8 @@
2007-08-31 Paolo Carlini <pcarlini@suse.de>
PR c++/32113
* g++.dg/template/crash70.C: New.
2007-08-31 Nick Clifton <nickc@redhat.com>
* gcc.c-torture/execute/execute.exp: Change copyright header to

View File

@@ -0,0 +1,7 @@
// PR c++/32113
template<int> struct A;
template<typename T> void foo (A<&T::template i>); // { dg-error "not a template" }
template void foo<A<0> > (A<0>); // { dg-error "does not match" }