Commit 05969da4 by Jakub Jelinek Committed by Jakub Jelinek

re PR rtl-optimization/34132 (ICE: internal consistency failure (invalid rtl…

re PR rtl-optimization/34132 (ICE: internal consistency failure (invalid rtl sharing found in the insn))

	PR rtl-optimization/34132
	* gcse.c (try_replace_reg): Avoid rtx sharing between REG_EQUAL note
	and insn.

	* gcc.c-torture/compile/20071118-1.c: New test.

From-SVN: r130275
parent 33727b5e
2007-11-18 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/34132
* gcse.c (try_replace_reg): Avoid rtx sharing between REG_EQUAL note
and insn.
PR middle-end/33335
* optabs.h (optab_table): Change type to struct optab from optab.
(convert_optab_table): Similarly.
......@@ -2665,7 +2665,8 @@ try_replace_reg (rtx from, rtx to, rtx insn)
with our replacement. */
if (note != 0 && REG_NOTE_KIND (note) == REG_EQUAL)
set_unique_reg_note (insn, REG_EQUAL,
simplify_replace_rtx (XEXP (note, 0), from, to));
simplify_replace_rtx (XEXP (note, 0), from,
copy_rtx (to)));
if (!success && set && reg_mentioned_p (from, SET_SRC (set)))
{
/* If above failed and this is a single set, try to simplify the source of
......
2007-11-18 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/34132
* gcc.c-torture/compile/20071118-1.c: New test.
2007-11-18 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31608
/* PR rtl-optimization/34132 */
/* Testcase by Martin Michlmayr <tbm@cyrius.com> */
static char *m = "%s%u.msg";
extern void bar (int, const char *);
void foo (short x, int y, int z)
{
if (x == 0)
{
bar (y, m);
z = 1;
}
else if (x == 1)
z = 0;
bar (y, m);
bar (z, "%d");
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment