* gcc.dg/20001108-1.c: New test.
authorJakub Jelinek <jakub@redhat.com>
Thu, 9 Nov 2000 09:31:48 +0000 (10:31 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 9 Nov 2000 09:31:48 +0000 (10:31 +0100)
From-SVN: r37339

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/20001108-1.c [new file with mode: 0644]

index 2757aeac53b3a9865939e1237dd01db93decd9b9..37586a30022b3f3e71de899bac3a22a317773f0b 100644 (file)
@@ -1,3 +1,7 @@
+2000-11-09  Jakub Jelinek  <jakub@redhat.com>
+
+       * gcc.dg/20001108-1.c: New test.
+
 2000-11-09  Jakub Jelinek  <jakub@redhat.com>
 
        * gcc.c-torture/execute/string-opt-1.c: Add test for strstr
diff --git a/gcc/testsuite/gcc.dg/20001108-1.c b/gcc/testsuite/gcc.dg/20001108-1.c
new file mode 100644 (file)
index 0000000..a21d5b0
--- /dev/null
@@ -0,0 +1,30 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fomit-frame-pointer" } */
+
+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);
+}