15342 – [arm-linux] internal compiler error: in verify_local_live_at_start (original) (raw)

Description Philip Blundell 2004-05-08 18:41:43 UTC

$ ./cc1 -O2 -frename-registers gtktext.i [...] gtktext.c: In function `gtk_text_insert': gtktext.c:1085: internal compiler error: in verify_local_live_at_start, at flow.c:546 Please submit a full bug report,

Comment 3 Serge Belyshev 2004-05-09 13:59:10 UTC

Created attachment 6244 [details] even smaller testcase (312 bytes)

use '-O1 -fexpensive-optimizations -fgcse -fschedule-insns -frename-registers' for this.

Comment 4 Drea Pinski 2004-05-09 15:25:27 UTC

Confirmed.

Comment 5 Richard Earnshaw 2004-10-29 16:43:56 UTC

I think the key to what has failed here is that the reg-rename pass has missed the equivalence between start->index and a member of the copied structure.

In pseudo code, the output from the previous pass has the following instructions

r2 := [ip+8]/4
cc := cmp r2, #0

ne(cc): r0, r1, r2 := [r0]/12 ne(cc): [ip]/12 := r0, r1, r2 // Note [ip+8]/4 set to new r2 ... cc := cmp r2, #1 // ...so no need to reload it here gt(cc): r3 := #0 gt(cc): [ip+8]/4 := r3 return

Note that r2 is updated by the first conditional instruction (a conditional ldm on ARM). The conditional move code on ARM uses hard registers, but CSE has clearly noticed this equivalence at some point and merged the two uses to avoid a redundant re-load of start->index. Unfortunately, rename_registers has missed this and split the two uses up again. This creates a use of r2 when it isn't correctly initialized.

r1 := [ip+8]/4
cc := cmp r1, #0

ne(cc): r0, r1, r2 := [r0]/12 ne(cc): [ip]/12 := r0, r1, r2 cc := cmp r2, #1 // r2 incorrect if previous insn not exec gt(cc): r3 := #0 gt(cc): [ip+8]/4 := r3 return

Comment 7 Drea Pinski 2005-01-23 23:47:42 UTC

Fixed.

Comment 8 Drea Pinski 2005-01-23 23:47:59 UTC

*** Bug 18295 has been marked as a duplicate of this bug. ***

Comment 10 Richard Earnshaw 2005-09-01 13:14:01 UTC

*** Bug 17810 has been marked as a duplicate of this bug. ***