This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

NOTE_INSN_LOOP_END note crept in between casesi-insn and addr_diff_vec?

The CRIS port inspects PREV_INSN (PREV_INSN (jump_table)) in
ASM_OUTPUT_CASE_END and expects the casesi insn to be there.
Now a note has crept in between the jump table insn (last insn
in the casesi expansion) and the jump_table.  This breaks cris-*
as follows (for a while, but for the record this particular
checkout was from "Thu Sep 2 12:32:53 GMT 2004" (with the
"WARNing" in toplev.c updated)):

/home/hp/builds2/cris-xsim/gcc/xgcc -B/home/hp/builds2/cris-xsim/gcc/ -B/home/hp/work/axis/build/gcc3testprefix/cris-elf/bin/ -B/\
home/hp/work/axis/build/gcc3testprefix/cris-elf/lib/ -isystem /home/hp/work/axis/build/gcc3testprefix/cris-elf/include -isystem /\
home/hp/work/axis/build/gcc3testprefix/cris-elf/sys-include -c -DHAVE_CONFIG_H -O2 -g -O2  -I. -I/home/hp/cvs_areas/combined/cvs_\
write/libiberty/../include  -W -Wall -Wtraditional -pedantic /home/hp/cvs_areas/combined/cvs_write/libiberty/cplus-dem.c -o cplus\
/home/hp/cvs_areas/combined/cvs_write/libiberty/cplus-dem.c: In function `do_type':
/home/hp/cvs_areas/combined/cvs_write/libiberty/cplus-dem.c:3813: internal compiler error: Segmentation fault

The SEGV is when outputting the end of a case table.  The RTL at
final output is as follows:

(jump_insn 1685 2172 1719 /home/hp/cvs_areas/combined/cvs_write/libiberty/cplus-dem.c:3844 (parallel [
            (set (pc)
                (if_then_else (ltu (reg:SI 9 r9 [473])
                        (const_int 51 [0x33]))
                    (plus:SI (sign_extend:SI (mem:HI (plus:SI (mult:SI (reg:SI 9 r9 [473])
                                        (const_int 2 [0x2]))
                                    (pc)) [0 S2 A8]))
                    (label_ref 959)))
            (use (label_ref 1686))
        ]) 91 {*casesi_adds_w} (insn_list 1684 (nil))
    (expr_list:REG_BR_PRED (const_int 12 [0xc])
        (expr_list (reg:SI 9 r9 [473])

(note 1719 1685 1686 NOTE_INSN_LOOP_END)

(code_label 1686 1719 1687 1042 "" [1 uses])

(jump_insn 1687 1686 1688 (addr_diff_vec:HI (label_ref:SI 1686)
            (label_ref:SI 825)
            (label_ref:SI 959)

Eh, I'm sure that NOTE_INSN_LOOP_END didn't use to be there.
Anyway, it seems I have been relying on an undocumented relation
in the CRIS port (not documented at ASM_OUTPUT_CASE_END at
least).  Maybe that was supposed to change, but maybe a bug
caused the NOTE_INSN_LOOP_END to move there.  I'll find out soon
anyway, I'm just fishing for a quick answer.

brgds, H-P

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]