]> gcc.gnu.org Git - gcc.git/commitdiff
re PR c++/43705 (ICE: SIGSEGV with template specialization in non-namespace scope)
authorPaolo Carlini <paolo.carlini@oracle.com>
Tue, 4 May 2010 14:17:52 +0000 (14:17 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 4 May 2010 14:17:52 +0000 (14:17 +0000)
/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

gcc/cp/ChangeLog
gcc/cp/call.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/crash95.C [new file with mode: 0644]

index 026abe8254dec6cbb80ee0054ef1f854bbf783ff..634a74b98347ddffe006c821665be1f8c3d8c23c 100644 (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
index 7915417bd6ed9db8345a611f0301d04357867cf1..157b473cdc4d112fd70a7a2e50056114002c6d9b 100644 (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))
index 29eaf7171643cbb69ee5ded38deb857b83906a66..d43de64bde4f5e050375b6a824f3c490cd952671 100644 (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
diff --git a/gcc/testsuite/g++.dg/template/crash95.C b/gcc/testsuite/g++.dg/template/crash95.C
new file mode 100644 (file)
index 0000000..959a9d0
--- /dev/null
@@ -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);
This page took 0.086795 seconds and 5 git commands to generate.