* template1.C: New test.
authorAlexandre Oliva <oliva@dcc.unicamp.br>
Thu, 1 Jul 1999 15:47:34 +0000 (15:47 +0000)
committerAlexandre Oliva <oliva@gcc.gnu.org>
Thu, 1 Jul 1999 15:47:34 +0000 (15:47 +0000)
From-SVN: r27885

gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.oliva/template1.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog b/gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog
new file mode 100644 (file)
index 0000000..f8076c1
--- /dev/null
@@ -0,0 +1,4 @@
+1999-07-01  Alexandre Oliva  <oliva@dcc.unicamp.br>
+
+       * template1.C: New test.
+
diff --git a/gcc/testsuite/g++.old-deja/g++.oliva/template1.C b/gcc/testsuite/g++.old-deja/g++.oliva/template1.C
new file mode 100644 (file)
index 0000000..6acd3fb
--- /dev/null
@@ -0,0 +1,14 @@
+// Build don't link:
+
+// by Alexandre Oliva <oliva@dcc.unicamp.br>
+// based on bug report by Stefan Wetzel <Stefan_Wetzel@Physik.TU-Muenchen.DE>
+
+// crash test - XFAIL *-*-*
+
+template<int P = 0> struct foo {
+  static void bar(double (*)[dim]) {} // ERROR - dim not declared
+};
+
+void bar() {
+  foo<>::bar(0); // ERROR - instantiated from here
+}