aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/20001108-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/20001108-1.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/20001108-1.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/20001108-1.c b/gcc-4.9/gcc/testsuite/gcc.dg/20001108-1.c
new file mode 100644
index 000000000..682257fdb
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/20001108-1.c
@@ -0,0 +1,33 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fomit-frame-pointer" } */
+
+extern void abort (void);
+extern void exit (int);
+
+void die (long) __attribute__ ((noreturn));
+
+void die (long e)
+{
+ abort ();
+ for (;;);
+}
+
+long foo (double i)
+{
+ if (i != 2.0)
+ abort ();
+ return 26;
+}
+
+long bar (long i, double x)
+{
+ if (x < 0) die (1);
+ return foo (x);
+}
+
+main()
+{
+ if (bar (0, 2.0) != 26)
+ abort ();
+ exit (0);
+}