re PR c++/60493 (g++ throws segmentation fault on simple code)
authorPaolo Carlini <paolo.carlini@oracle.com>
Fri, 19 Dec 2014 16:50:31 +0000 (16:50 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 19 Dec 2014 16:50:31 +0000 (16:50 +0000)
2014-12-19  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/60493
* g++.dg/template/crash120.C: New.

From-SVN: r218957

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

index 9c46504032ae713bffd4f36b0927adbfe8a0fdd4..39f8ad2358bf453974461eebf59e26550aa48d0d 100644 (file)
@@ -1,3 +1,8 @@
+2014-12-19  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/60493
+       * g++.dg/template/crash120.C: New.
+
 2014-12-19  Kai Tietz  <ktietz@redhat.com>
 
        PR c++/61198
diff --git a/gcc/testsuite/g++.dg/template/crash120.C b/gcc/testsuite/g++.dg/template/crash120.C
new file mode 100644 (file)
index 0000000..9d15c2e
--- /dev/null
@@ -0,0 +1,18 @@
+// PR c++/60493
+
+template <class T, class U>
+struct foo
+{
+};
+template <class T>
+struct baz
+{
+  class bar;
+};
+
+template <class T, class D>
+struct baz<T>::bar : foo<int, D>  // { dg-error "parameters|required" }
+{
+};
+
+baz<int>::bar it; // { dg-error "incomplete" }