This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch RFA] Fix PR rtl-optimization/34808
Eric Botcazou <ebotcazou@adacore.com> wrote:
>> PR rtl-optimization/34808
>> * emit-rtl.c (try_split): Handle REG_RETVAL notes.
>
> This is OK for mainline if you add the testcase to the testsuite.
>
> :REVIEWMAIL:
Thanks!
For the record, I've added the testcase below which is a reduced
one of the original testcase in PR 34808.
Regards,
kaz
--
2008-01-20 Kaz Kojima <kkojima@gcc.gnu.org>
PR rtl-optimization/34808
* gcc.c-torture/compile/pr34808.c: New test.
diff -uprN ORIG/trunk/gcc/testsuite/gcc.c-torture/compile/pr34808.c LOCAL/trunk/gcc/testsuite/gcc.c-torture/compile/pr34808.c
--- ORIG/trunk/gcc/testsuite/gcc.c-torture/compile/pr34808.c 1970-01-01 09:00:00.000000000 +0900
+++ LOCAL/trunk/gcc/testsuite/gcc.c-torture/compile/pr34808.c 2008-01-21 08:44:02.000000000 +0900
@@ -0,0 +1,29 @@
+/* PR 34808 */
+/* { dg-do compile }
+/* { dg-options "-fno-tree-dominator-opts" } */
+
+extern int flags;
+
+struct r { int code; int val;};
+
+int
+foo (struct r *home)
+{
+ int n = 0;
+ int regno = -1;
+
+ if (home->code == 0)
+ regno = home->val;
+
+ if (home->code == 1)
+ bar ();
+ else if (regno >= 0)
+ n = (regno == 16
+ ? 16
+ : (regno - (unsigned long long) (flags != 0 ? 63 : 15)
+ ? regno - 128
+ : -1));
+
+ baz ();
+ return n;
+}