This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] -dav and -dov testcases
Hi!
Here are testcases for -dav and -dov. scan-rtl-dump is not written,
so all it does is check that there are no ICEs (without the patches posted
today gcc.dg/20050811-2.c fails, with those patches both tests succeed).
2005-08-11 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/20050811-1.c: New test.
* gcc.dg/20050811-2.c: New test.
--- gcc/testsuite/gcc.dg/20050811-1.c.jj 2005-08-11 13:32:52.000000000 +0200
+++ gcc/testsuite/gcc.dg/20050811-1.c 2005-08-11 13:33:40.000000000 +0200
@@ -0,0 +1,20 @@
+/* Test whether -dav doesn't crash. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -dav" } */
+
+int foo (void)
+{
+ return 6;
+}
+
+int bar (int x)
+{
+ if (x < 0)
+ return foo () + 8;
+ else if (x > 0)
+ return 2 * foo ();
+ else
+ return foo ();
+}
+
+// { dg-final { cleanup-rtl-dump "*" } }
--- gcc/testsuite/gcc.dg/20050811-2.c.jj 2005-08-11 13:32:52.000000000 +0200
+++ gcc/testsuite/gcc.dg/20050811-2.c 2005-08-11 13:33:58.000000000 +0200
@@ -0,0 +1,20 @@
+/* Test whether -dov doesn't crash. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -dov" } */
+
+int foo (void)
+{
+ return 6;
+}
+
+int bar (int x)
+{
+ if (x < 0)
+ return foo () + 8;
+ else if (x > 0)
+ return 2 * foo ();
+ else
+ return foo ();
+}
+
+// { dg-final { cleanup-rtl-dump "postreload*" } }
Jakub