aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20060930-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20060930-1.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20060930-1.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20060930-1.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20060930-1.c
new file mode 100644
index 000000000..f12ee55dd
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20060930-1.c
@@ -0,0 +1,42 @@
+/* PR rtl-optimization/28096 */
+/* Origin: Jan Stein <jan@gatespacetelematics.com> */
+
+extern void abort (void);
+
+int bar (int, int) __attribute__((noinline));
+int bar (int a, int b)
+{
+ if (b != 1)
+ abort ();
+}
+
+void foo(int, int) __attribute__((noinline));
+void foo (int e, int n)
+{
+ int i, bb2, bb5;
+
+ if (e > 0)
+ e = -e;
+
+ for (i = 0; i < n; i++)
+ {
+ if (e >= 0)
+ {
+ bb2 = 0;
+ bb5 = 0;
+ }
+ else
+ {
+ bb5 = -e;
+ bb2 = bb5;
+ }
+
+ bar (bb5, bb2);
+ }
+}
+
+int main(void)
+{
+ foo (1, 1);
+ return 0;
+}