OSDN Git Service

* g++.dg/template/sizeof2.C: New test.
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Jul 2002 03:19:37 +0000 (03:19 +0000)
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Jul 2002 03:19:37 +0000 (03:19 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55170 138bc75d-0d04-0410-961f-82ee72b054a4

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);
+}