re PR c++/43705 (ICE: SIGSEGV with template specialization in non-namespace scope)

/cp
2010-05-04  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/43705
	* call.c (build_new_method_call): Return error_mark_node if fns is
	NULL_TREE.

/testsuite
2010-05-04  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/43705
	* g++.dg/template/crash95.C: New.

From-SVN: r159029
This commit is contained in:
Paolo Carlini 2010-05-04 14:17:52 +00:00 committed by Paolo Carlini
parent 0d3f65273b
commit 4ac4b59698
4 changed files with 23 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/43705
* call.c (build_new_method_call): Return error_mark_node if fns is
NULL_TREE.
2010-05-03 Dodji Seketeli <dodji@redhat.com>
PR c++/43953

View file

@ -6219,7 +6219,7 @@ build_new_method_call (tree instance, tree fns, VEC(tree,gc) **args,
*fn_p = NULL_TREE;
if (error_operand_p (instance)
|| error_operand_p (fns))
|| !fns || error_operand_p (fns))
return error_mark_node;
if (!BASELINK_P (fns))

View file

@ -1,3 +1,8 @@
2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/43705
* g++.dg/template/crash95.C: New.
2010-05-04 H.J. Lu <hongjiu.lu@intel.com>
PR debug/43508

View file

@ -0,0 +1,11 @@
// PR c++/43705
template < typename > struct S
{
template < > struct S < int > // { dg-error "explicit|specialization|template|parameter" }
{
S(int);
};
};
S < int > s(0);