aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/other
diff options
context:
space:
mode:
authorgiovannibajo <giovannibajo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-02-23 12:44:22 +0000
committergiovannibajo <giovannibajo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-02-23 12:44:22 +0000
commit255dc8ca05ae77369cbfc92268e0873a685ddd8d (patch)
tree72f2e1db168b1033e8811428c64c3ecf236b5d2a /gcc/testsuite/g++.dg/other
parent82e18817eb8cff09cdbe413cf9cf4562a9611ca7 (diff)
PR c++/14250
* g++.dg/other/switch1.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@78295 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.dg/other')
-rw-r--r--gcc/testsuite/g++.dg/other/switch1.C20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/other/switch1.C b/gcc/testsuite/g++.dg/other/switch1.C
new file mode 100644
index 00000000000..a22d2b573fa
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/switch1.C
@@ -0,0 +1,20 @@
+// { dg-do compile }
+// Contributed by: Nick Savoiu <savoiu at ics dot uci dot edu>
+// PR c++/14250: Incomplete type in switch statement
+
+template <typename T>
+struct A {
+ operator int();
+};
+
+struct C1 {
+ static A<void> t1;
+
+ void fun()
+ {
+ switch(t1)
+ {
+ default: break;
+ }
+ }
+};