mirror of
https://gcc.gnu.org/git/gcc.git
synced 2026-02-22 03:46:53 -05:00
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:
committed by
Paolo Carlini
parent
c12a229d49
commit
c1fca6dfb7
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
7
gcc/testsuite/g++.dg/template/crash70.C
Normal file
7
gcc/testsuite/g++.dg/template/crash70.C
Normal 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" }
|
||||
Reference in New Issue
Block a user