Commit ec6f831a by Richard Henderson

re PR target/60598 (ICE in maybe_record_trace_start, at dwarf2cfi.c:2239)

PR target/60598

	* ifcvt.c (dead_or_predicable): Return FALSE if there are any frame
	related insns after epilogue_completed.
	* gcc.dg/pr60598.c: New test.

From-SVN: r208749
parent 3d8d0043
2014-03-21 Richard Henderson <rth@twiddle.net>
PR target/60598
* ifcvt.c (dead_or_predicable): Return FALSE if there are any frame
related insns after epilogue_completed.
2014-03-21 Martin Jambor <mjambor@suse.cz>
PR ipa/59176
......
......@@ -4144,6 +4144,21 @@ dead_or_predicable (basic_block test_bb, basic_block merge_bb,
end = PREV_INSN (end);
}
/* Don't move frame-related insn across the conditional branch. This
can lead to one of the paths of the branch having wrong unwind info. */
if (epilogue_completed)
{
rtx insn = head;
while (1)
{
if (INSN_P (insn) && RTX_FRAME_RELATED_P (insn))
return FALSE;
if (insn == end)
break;
insn = NEXT_INSN (insn);
}
}
/* Disable handling dead code by conditional execution if the machine needs
to do anything funny with the tests, etc. */
#ifndef IFCVT_MODIFY_TESTS
......
2014-03-21 Jakub Jelinek <jakub@redhat.com>
PR target/60598
* gcc.dg/pr60598.c: New test.
2014-03-21 Martin Jambor <mjambor@suse.cz>
PR ipa/59176
......
/* PR target/60598 */
/* { dg-do compile } */
/* { dg-options "-O2" } */
/* { dg-additional-options "-fpic" { target fpic } } */
/* { dg-additional-options "-march=z196 -mtune=zEC12" { target s390*-*-* } } */
struct S { unsigned a, b[32]; };
void
foo (struct S *x, struct S *y)
{
unsigned a = y->a, i;
if (x == y)
for (i = 0; i < a - 1 - i; i++)
{
unsigned t = x->b[i];
x->b[i] = x->b[a - 1 - i];
x->b[a - 1 - i] = t;
}
else
{
x->a = a;
for (i = 0; i < a; i++)
x->b[i] = y->b[a - 1 - i];
}
}
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