aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20020916-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20020916-1.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20020916-1.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20020916-1.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20020916-1.c
new file mode 100644
index 000000000..3f2db15d0
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20020916-1.c
@@ -0,0 +1,19 @@
+/* Distilled from try_pre_increment in flow.c. If-conversion inserted
+ new instructions at the wrong place on ppc. */
+
+int foo(int a)
+{
+ int x;
+ x = 0;
+ if (a > 0) x = 1;
+ if (a < 0) x = 1;
+ return x;
+}
+
+int main()
+{
+ if (foo(1) != 1)
+ abort();
+ return 0;
+}
+