]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/39750 (ICE in uses_template_parms, at cp/pt.c:6332)
authorJason Merrill <jason@redhat.com>
Mon, 13 Apr 2009 18:54:40 +0000 (14:54 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 13 Apr 2009 18:54:40 +0000 (14:54 -0400)
PR c++/39750
* pt.c (uses_template_parms): Handle CONSTRUCTOR.

From-SVN: r146006

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

index 744941c9895e717e3f0e447b8961b7d268fd4dc8..905b6e431dd16bb5d16dbcd21c3244546d14f0e7 100644 (file)
@@ -1,3 +1,8 @@
+2009-04-13  Jason Merrill  <jason@redhat.com>
+
+       PR c++/39750
+       * pt.c (uses_template_parms): Handle CONSTRUCTOR.
+
 2009-04-12  Jason Merrill  <jason@redhat.com>
 
        PR c++/39742
index 24a5bcc8d97923b1696bf9d5c8307f986cc00dab..869146efe8eaa940c27d853ff86ba5207e50e5f4 100644 (file)
@@ -5391,7 +5391,9 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain)
       else
        {
          /* We must only copy the non-tail padding parts.
-            Use __builtin_memcpy for the bitwise copy.  */
+            Use __builtin_memcpy for the bitwise copy.
+            FIXME fix 22488 so we can go back to using MODIFY_EXPR
+            instead of an explicit call to memcpy.  */
        
          tree arg0, arg1, arg2, t;
 
index 8dd35795a125f28cf19290a7cacce028effde097..2fd6257072323bdd3bdd18c6b0c7784f3241c859 100644 (file)
@@ -6325,6 +6325,7 @@ uses_template_parms (tree t)
           || TREE_CODE (t) == BASELINK
           || TREE_CODE (t) == IDENTIFIER_NODE
           || TREE_CODE (t) == TRAIT_EXPR
+          || TREE_CODE (t) == CONSTRUCTOR
           || CONSTANT_CLASS_P (t))
     dependent_p = (type_dependent_expression_p (t)
                   || value_dependent_expression_p (t));
index 36b329dcbd3bb93175622d274349fb1557f33dcd..c920a6f20b580780c05e06c6296ea0d32ff4c022 100644 (file)
@@ -1,3 +1,8 @@
+2009-04-13  Jason Merrill  <jason@redhat.com>
+
+       PR c++/39750
+       * g++.dg/template/crash90.C: New.
+
 2009-04-12  Jason Merrill  <jason@redhat.com>
 
        PR c++/39742
diff --git a/gcc/testsuite/g++.dg/template/crash90.C b/gcc/testsuite/g++.dg/template/crash90.C
new file mode 100644 (file)
index 0000000..da24359
--- /dev/null
@@ -0,0 +1,8 @@
+// PR c++/39750
+
+template < unsigned >
+struct A ;
+template < typename >
+struct B ;
+template < typename T , A < B < T > // { dg-error "" }
+{ }