From: Jakub Jelinek Date: Tue, 6 Dec 2011 17:15:11 +0000 (+0100) Subject: re PR target/51354 (ICE in maybe_record_trace_start) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=762f7770391d32e935cf30f05aa0624bb1be870d;p=gcc.git re PR target/51354 (ICE in maybe_record_trace_start) PR target/51354 * config/i386/i386.c (ix86_emit_leave): Call ix86_add_cfa_restore_note unconditionally. * gcc.c-torture/compile/pr51354.c: New test. From-SVN: r182056 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c74afa92740..9a2249629b2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-12-06 Jakub Jelinek + + PR target/51354 + * config/i386/i386.c (ix86_emit_leave): Call ix86_add_cfa_restore_note + unconditionally. + 2011-12-06 Georg-Johann Lay Forward-port from gcc-4_6-branch r181936 2011-12-02. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 1b871be8480..16387991705 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -10545,9 +10545,9 @@ ix86_emit_leave (void) add_reg_note (insn, REG_CFA_DEF_CFA, plus_constant (stack_pointer_rtx, m->fs.sp_offset)); RTX_FRAME_RELATED_P (insn) = 1; - ix86_add_cfa_restore_note (insn, hard_frame_pointer_rtx, - m->fs.fp_offset); } + ix86_add_cfa_restore_note (insn, hard_frame_pointer_rtx, + m->fs.fp_offset); } /* Emit code to restore saved registers using MOV insns. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ac537cf44e8..04729740be9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-12-06 Jakub Jelinek + + PR target/51354 + * gcc.c-torture/compile/pr51354.c: New test. + 2011-12-06 Paolo Carlini PR c++/51431 diff --git a/gcc/testsuite/gcc.c-torture/compile/pr51354.c b/gcc/testsuite/gcc.c-torture/compile/pr51354.c new file mode 100644 index 00000000000..5b2abb0d421 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr51354.c @@ -0,0 +1,17 @@ +/* PR target/51354 */ + +extern void abort (void); + +typedef int __attribute__ ((aligned (32))) ai; + +void foo (int *x, ai * y); + +int +bar (int x) +{ + if (x == 12346) + return 24; + ai i; + foo (__builtin_alloca (x), &i); + return 128; +}