From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29724 invoked by alias); 20 Mar 2014 16:26:39 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 29667 invoked by uid 48); 20 Mar 2014 16:26:35 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/60598] [4.9 Regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239 Date: Thu, 20 Mar 2014 16:26:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on cc everconfirmed Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-03/txt/msg01878.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60598 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2014-03-20 CC| |jakub at gcc dot gnu.org, | |krebbel at gcc dot gnu.org, | |rth at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #3 from Jakub Jelinek --- Slightly more reduced testcase for -march=z196 -mtune=zEC12 -m64 -O2 -fpic: 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]; } } Regressed with r208165, seems that the function is shrink-wrapped and the *.ce3 pass incorrectly moves a frame related insn across a conditional jump to a code label right before the frame related insn, where the conditional jump falls through into a simple_return. Having the register save ahead of such conditional jump means the *.dwarf2 pass sees a path where we reach with saved, but not restored, register the simple_return and die. (jump_insn 48 39 156 3 (parallel [ (set (pc) (if_then_else (ne (reg/v:SI 1 %r1 [orig:87 a ] [87]) (const_int 1 [0x1])) (label_ref:DI 164) (pc))) (set (reg:SI 1 %r1 [orig:89 D.1427 ] [89]) (plus:SI (reg/v:SI 1 %r1 [orig:87 a ] [87]) (const_int -1 [0xffffffffffffffff]))) (clobber (scratch:SI)) (clobber (reg:CC 33 %cc)) ]) pr60598.c:8 619 {doloop_si64} (expr_list:REG_UNUSED (reg:CC 33 %cc) (int_list:REG_BR_PROB 9697 (nil))) -> 164) (code_label 156 48 151 5 14 "" [1 uses]) (note 151 156 166 5 [bb 5] NOTE_INSN_BASIC_BLOCK) (jump_insn 166 151 153 5 (simple_return) -1 (nil) -> simple_return) (barrier 153 166 164) (code_label 164 153 163 6 15 "" [1 uses]) (note 163 164 147 6 [bb 6] NOTE_INSN_BASIC_BLOCK) (insn/f 147 163 148 6 (set (reg:DI 16 %f0) (reg:DI 11 %r11)) pr60598.c:5 -1 (expr_list:REG_DEAD (reg:DI 11 %r11) (nil))) (note 148 147 126 6 NOTE_INSN_PROLOGUE_END) is what we have in the *.peephole2 dump, and the *.ce3 pass moves insn 147 and 148 right before insn 48.