* gcc.dg/pr33676.c: Move from gcc.dg/torture directory.
From-SVN: r129252
2007-10-11 Kenneth Zadeck <zadeck@naturalbridge.com>
PR middle-end/33676
- * gcc.dg/torture/pr33676.c: New.
+ * gcc.dg/pr33676.c: New.
2007-10-11 Paolo Carlini <pcarlini@suse.de>
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O0 -mtune=i386 -fomit-frame-pointer" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
+
+__attribute__((noreturn,noinline)) void abrt (const char *fi, const char *fu)
+{
+ __builtin_abort ();
+}
+
+__attribute__((noinline)) int f (int k)
+{
+ return k;
+}
+
+__attribute__((noinline)) int g (int t, int k)
+{
+ int b;
+
+ switch (t)
+ {
+ case 0:
+ abrt (__FILE__, __FUNCTION__);
+
+ case 1:
+ b = f (k);
+ break;
+
+ case 2:
+ b = f (k);
+ break;
+
+ case 3:
+ b = f (k);
+ break;
+
+ case 4:
+ b = f (k);
+ break;
+
+ default:
+ abrt (__FILE__, __FUNCTION__);
+ }
+
+ return b;
+}
+
+int main (void)
+{
+ if (g (3, 1337) != 1337)
+ abrt (__FILE__, __FUNCTION__);
+ return 0;
+}
+++ /dev/null
-/* { dg-do run } */
-/* { dg-options "-march=i586 -fomit-frame-pointer" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
-
-__attribute__((noreturn,noinline)) void abrt (const char *fi, const char *fu)
-{
- __builtin_abort ();
-}
-
-__attribute__((noinline)) int f (int k)
-{
- return k;
-}
-
-__attribute__((noinline)) int g (int t, int k)
-{
- int b;
-
- switch (t)
- {
- case 0:
- abrt (__FILE__, __FUNCTION__);
-
- case 1:
- b = f (k);
- break;
-
- case 2:
- b = f (k);
- break;
-
- case 3:
- b = f (k);
- break;
-
- case 4:
- b = f (k);
- break;
-
- default:
- abrt (__FILE__, __FUNCTION__);
- }
-
- return b;
-}
-
-int main (void)
-{
- if (g (3, 1337) != 1337)
- abrt (__FILE__, __FUNCTION__);
- return 0;
-}