+2008-01-20 Kaz Kojima <kkojima@gcc.gnu.org>
+
+ PR rtl-optimization/34808
+ * emit-rtl.c (try_split): Handle REG_RETVAL notes.
+
2008-01-20 Richard Sandiford <rsandifo@nildram.co.uk>
* global.c (find_reg): Only compute EH_RETURN_DATA_REGNO once per
rtx before = PREV_INSN (trial);
rtx after = NEXT_INSN (trial);
int has_barrier = 0;
- rtx tem, note_retval;
+ rtx tem, note_retval, note_libcall;
rtx note, seq;
int probability;
rtx insn_last, insn;
XEXP (note_retval, 0) = insn_last;
break;
+ case REG_RETVAL:
+ /* Relink the insns with REG_LIBCALL note and with REG_RETVAL note
+ after split. */
+ REG_NOTES (insn_last)
+ = gen_rtx_INSN_LIST (REG_RETVAL,
+ XEXP (note, 0),
+ REG_NOTES (insn_last));
+
+ note_libcall = find_reg_note (XEXP (note, 0), REG_LIBCALL, NULL);
+ XEXP (note_libcall, 0) = insn_last;
+ break;
+
default:
break;
}
+2008-01-20 Kaz Kojima <kkojima@gcc.gnu.org>
+
+ PR rtl-optimization/34808
+ * gcc.c-torture/compile/pr34808.c: New test.
+
2008-01-20 Paul Thomas <pault@gcc.gnu.org>
PR fortran/34784
--- /dev/null
+/* 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;
+}