re PR c++/33955 (internal compiler error: in dependent_type_p, at cp/pt.c:15245 ...
authorDouglas Gregor <doug.gregor@gmail.com>
Fri, 2 Nov 2007 03:26:46 +0000 (03:26 +0000)
committerDoug Gregor <dgregor@gcc.gnu.org>
Fri, 2 Nov 2007 03:26:46 +0000 (03:26 +0000)
2007-11-01  Douglas Gregor  <doug.gregor@gmail.com>

PR c++/33955
* pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.

2007-11-01  Douglas Gregor  <doug.gregor@gmail.com>

* g++.dg/cpp0x/pr33955.C: New.

From-SVN: r129843

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

index 51f219bb7bf7e13fa7b687d369014c3070715e11..c784c31f0661c3f95c282629b27324cc77ec030e 100644 (file)
@@ -1,3 +1,8 @@
+2007-11-01  Douglas Gregor  <doug.gregor@gmail.com>
+
+       PR c++/33955
+       * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
+
 2007-11-01  Jakub Jelinek  <jakub@redhat.com>
 
        PR c++/32384
index 5f6e29690d2cedeb2c6a0780c6aa553571cf8a43..8f72ba90ec71583c37df85e2bf58655523096f9d 100644 (file)
@@ -2504,7 +2504,14 @@ find_parameter_packs_r (tree *tp, int *walk_subtrees, void* data)
       
       *walk_subtrees = 0;
       return NULL_TREE;
-       
+    case TYPENAME_TYPE:
+      cp_walk_tree (&TYPENAME_TYPE_FULLNAME (t), &find_parameter_packs_r,
+                   ppd, ppd->visited);
+      *walk_subtrees = 0;
+      return NULL_TREE;
+
+      
     case TYPE_PACK_EXPANSION:
     case EXPR_PACK_EXPANSION:
       *walk_subtrees = 0;
index b1c5701bc3fdd5c2932a5cab3b74aeda1b725731..459d5a2509277faed2afa534a37807f26f32feae 100644 (file)
@@ -1,3 +1,7 @@
+2007-11-01  Douglas Gregor  <doug.gregor@gmail.com>
+
+       * g++.dg/cpp0x/pr33955.C: New.
+
 2007-11-01  Tom Tromey  <tromey@redhat.com>
 
        PR preprocessor/30805:
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr33955.C b/gcc/testsuite/g++.dg/cpp0x/pr33955.C
new file mode 100644 (file)
index 0000000..cde92de
--- /dev/null
@@ -0,0 +1,39 @@
+// { dg-options "-std=c++0x" }
+template<typename T>
+struct uncvref
+{
+  typedef T type;
+};
+
+template<typename... Args>
+struct args
+{
+  static const int size = sizeof...(Args);
+};
+
+template<typename G, typename E, typename S, typename V, long GN = G::size, long EN = E::size>
+struct apply_args;
+
+template<typename... G, typename... E, typename S, typename V, long N>
+struct apply_args<args<G...>, args<E...>, S, V, N, N>
+{
+  typedef args<
+    typename G::template apply<typename uncvref<E>::type, S, V>::type...
+    > type;
+};
+
+struct or_
+{
+  template<typename E, typename S, typename V>
+  struct apply {
+    typedef typename E::type type;
+  };
+};
+
+template<typename T>
+struct identity
+{
+  typedef T type;
+};
+
+apply_args<args<or_>, args<identity<int>>, float, double> a1;