* g++.dg/template/sizeof2.C: New test.
authorMark Mitchell <mmitchel@gcc.gnu.org>
Tue, 2 Jul 2002 03:19:37 +0000 (03:19 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Tue, 2 Jul 2002 03:19:37 +0000 (03:19 +0000)
From-SVN: r55170

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

diff --git a/gcc/testsuite/g++.dg/template/sizeof2.C b/gcc/testsuite/g++.dg/template/sizeof2.C
new file mode 100644 (file)
index 0000000..76d1cf4
--- /dev/null
@@ -0,0 +1,23 @@
+// { dg-do compile }
+
+template<int size>
+struct Foobar {
+    // Contents irrelevant
+};
+
+template <typename A>
+struct Wrapper {
+    // Contents irrelevant
+};
+
+template <typename A>
+Foobar<sizeof(Wrapper<A>)> *
+compiler_bug (A)
+{
+    return 0;
+}
+
+int main()
+{
+    compiler_bug(1);
+}