summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/arm/headmerge-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/arm/headmerge-2.c')
-rw-r--r--gcc/testsuite/gcc.target/arm/headmerge-2.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/arm/headmerge-2.c b/gcc/testsuite/gcc.target/arm/headmerge-2.c
new file mode 100644
index 00000000000..36637a64eb3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/headmerge-2.c
@@ -0,0 +1,35 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler-times "120" 1 } } */
+
+extern void foo1 (int);
+extern void foo2 (int);
+extern void foo3 (int);
+extern void foo4 (int);
+extern void foo5 (int);
+extern void foo6 (int);
+
+void t (int x, int y)
+{
+ switch (y)
+ {
+ case 1:
+ foo1 (120);
+ break;
+ case 5:
+ foo2 (120);
+ break;
+ case 7:
+ foo3 (120);
+ break;
+ case 10:
+ foo4 (120);
+ break;
+ case 13:
+ foo5 (120);
+ break;
+ default:
+ foo6 (120);
+ break;
+ }
+}