aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20020320-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20020320-1.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20020320-1.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20020320-1.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20020320-1.c
new file mode 100644
index 000000000..385c061e1
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20020320-1.c
@@ -0,0 +1,24 @@
+/* PR bootstrap/4192
+ This testcase caused infinite loop in flow (several places),
+ because flow assumes gen_jump generates simple_jump_p. */
+
+typedef void (*T) (void);
+extern T x[];
+
+void
+foo (void)
+{
+ static T *p = x;
+ static _Bool a;
+ T f;
+
+ if (__builtin_expect (a, 0))
+ return;
+
+ while ((f = *p))
+ {
+ p++;
+ f ();
+ }
+ a = 1;
+}