REG_WAS_0 labels are wrong after bbro pass

John David Anglin dave@hiauly1.hia.nrc.ca
Wed Oct 3 12:30:00 GMT 2001


The following error occurs on bootstrapping vax-dec-ultrix4.3 with the
"current" main:

stage1/xgcc -Bstage1/ -B/usr/local/vax-dec-ultrix4.3/bin/ -c  -DIN_GCC    -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long  -DHAVE_CONFIG_H    -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/config -I../../gcc/../include ../../gcc/combine.c -o combine.o
../../gcc/combine.c: In function `can_combine_p':
../../gcc/combine.c:1192: Internal error: Segmentation fault

The segementation fault occurs in no_labels_between_p during assembly
code output.  The problem seems to be that the REG_WAS_0 labels are
invalid after bbro.  The causes a problem on the vax since patterns
such as movsi try to use this label during code generation.

Here is the relevant rtl from the bbro pass that causes the segmentation
fault:

;; Start of basic block 136, registers live: 6 [r6] 7 [r7] 8 [r8] 9 [r9] 10 [r10] 11 [r11] 12 [ap] 13 [fp] 14 [sp]
(note 914 46 47 [bb 136] NOTE_INSN_BASIC_BLOCK)

(insn 47 914 1384 (set (mem:SI (plus:SI (reg/f:SI 13 fp)
                (const_int -4 [0xfffffffc])) 0)
        (const_int 1 [0x1])) 16 {movsi} (nil)
    (insn_list:REG_WAS_0 40 (expr_list:REG_EQUAL (const_int 1 [0x1])
            (nil))))

(jump_insn 1384 47 1385 (set (pc)
        (label_ref 49)) -1 (nil)
    (nil))
;; End of basic block 136, registers live:
 6 [r6] 7 [r7] 8 [r8] 9 [r9] 10 [r10] 11 [r11] 12 [ap] 13 [fp] 14 [sp]

(barrier 1385 1384 39)

;; Start of basic block 137, registers live: 6 [r6] 7 [r7] 8 [r8] 9 [r9] 10 [r10] 11 [r11] 12 [ap] 13 [fp] 14 [sp]
(code_label 39 1385 913 157 "" "" [1 uses])

(note 913 39 40 [bb 137] NOTE_INSN_BASIC_BLOCK)

(insn 40 913 41 (set (mem:SI (plus:SI (reg/f:SI 13 fp)
                (const_int -4 [0xfffffffc])) 0)
        (const_int 0 [0x0])) 16 {movsi} (nil)
    (expr_list:REG_EQUAL (const_int 0 [0x0])
        (nil)))

The note on insn 47 refers to insn 40 which comes after insn 47 in the
sequence.  It seems that these labels need to be rebuilt after reordering.
The sequence appears ok prior to this pass.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)



More information about the Gcc-bugs mailing list