diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/other/switch1.C')
-rw-r--r-- | gcc/testsuite/g++.dg/other/switch1.C | 20 |
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 000000000..a22d2b573 --- /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; + } + } +}; |