re PR c++/52637 (ICE producing debug info for c++11 code using local class as templat...
authorJason Merrill <jason@redhat.com>
Wed, 20 Jun 2012 07:27:07 +0000 (03:27 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 20 Jun 2012 07:27:07 +0000 (03:27 -0400)
PR c++/52637
* g++.dg/debug/localclass1.C: New.

From-SVN: r188814

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

index 621ee9643ed1d021090bd9d2d44572a8aa5410d6..68406addfad73aca9ce86322d75e97f6125827ff 100644 (file)
@@ -1,3 +1,8 @@
+2012-06-19  Jason Merrill  <jason@redhat.com>
+
+       PR c++/52637
+       * g++.dg/debug/localclass1.C: New.
+
 2012-06-16 Ville Voutilainen <ville.voutilainen@gmail.com>
 
         * g++.dg/cpp0x/override4.C: New.
diff --git a/gcc/testsuite/g++.dg/debug/localclass1.C b/gcc/testsuite/g++.dg/debug/localclass1.C
new file mode 100644 (file)
index 0000000..db36d59
--- /dev/null
@@ -0,0 +1,21 @@
+// PR c++/52637
+// { dg-options "-g -std=c++11" }
+
+template <typename T>
+struct C { };
+
+template <typename V>
+void f(V v) {
+  struct B {};
+  C<B> c;
+}
+
+template <typename T>
+void g(T t) {
+  struct A { } a;
+  f (a);
+}
+
+struct D {
+  void h() { g(0); }
+};