summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/switch-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/switch-1.c')
-rwxr-xr-xgcc/testsuite/gcc.dg/switch-1.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/switch-1.c b/gcc/testsuite/gcc.dg/switch-1.c
new file mode 100755
index 0000000..457c520
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/switch-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile { target rs6000-*-linux* powerpc-*-linux*} } */
+/* { dg-options "-fpic -O2" } */
+
+void f (char *s)
+{
+ for (;;)
+ {
+ int t = 6;
+ switch (t)
+ {
+ case 2:
+ *s = '2';
+ case 6: case 4: case 3: case 1:
+ break;
+ }
+ }
+}