]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
This commit was manufactured by cvs2svn to create branch
authorNo Author <no-author@gcc.gnu.org>
Mon, 21 Feb 2005 21:11:51 +0000 (21:11 +0000)
committerNo Author <no-author@gcc.gnu.org>
Mon, 21 Feb 2005 21:11:51 +0000 (21:11 +0000)
'gcc-3_4-branch'.

From-SVN: r95349

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

diff --git a/gcc/testsuite/g++.dg/template/crash34.C b/gcc/testsuite/g++.dg/template/crash34.C
new file mode 100644 (file)
index 0000000..9cca62f
--- /dev/null
@@ -0,0 +1,12 @@
+// { dg-do compile }
+
+// PR c++/20028
+
+// We used to crash when referencing TYPE_SIZE_UNIT of the messed-up
+// type used for x, because it was not initialized.
+
+class Foo;
+
+template <typename T> class Foo { }; // { dg-error "not a template type" }
+
+Foo<int> x; // { dg-error "not a template" }