PR c++/40274
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 29 Jun 2009 23:18:46 +0000 (23:18 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 29 Jun 2009 23:18:46 +0000 (23:18 +0000)
* error.c (dump_template_parms): Pass all args to
count_non_default_template_args.
(count_non_default_template_args): Pull out the inner ones.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149067 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/debug1.C [new file with mode: 0644]

index 3adb59d..03e3a04 100644 (file)
@@ -1,3 +1,8 @@
+2009-06-29  Jason Merrill  <jason@redhat.com>
+
+       PR c++/40274
+       * g++.dg/template/debug1.C: New.
+
 2009-06-29  Tobias Burnus  <burnus@net-b.de>
 
        PR fortran/40580
diff --git a/gcc/testsuite/g++.dg/template/debug1.C b/gcc/testsuite/g++.dg/template/debug1.C
new file mode 100644 (file)
index 0000000..a2c1577
--- /dev/null
@@ -0,0 +1,18 @@
+// PR c++/40274
+// { dg-options "-g" }
+
+template <class T> struct valuelist_types
+{
+ struct null { };
+ template <T V, class next=null> struct list { };
+};
+
+template <unsigned D> void foo()
+{
+ typename valuelist_types<unsigned>::template list<D> v;
+}
+
+void bar()
+{
+ valuelist_types<unsigned>::list<2> v;
+}