------- Comment #3 from rask at gcc dot gnu dot org 2007-11-26 17:27 ------- This seems to have started with revision 130333, but I don't think that change is to blame:
(gdb) bt #0 frv_secondary_reload_class (class=ICC_REGS, mode=BImode, x=0x2b0f0ec48d80, in_p=0) at /n/12/rask/src/all/gcc/config/frv/frv.c:6347 #1 0x000000000073430a in default_secondary_reload (in_p=0 '\0', x=0x2b0f0ec48d80, reload_class=GPR_REGS, reload_mode=BImode, sri=0x7fff9c430880) at /n/12/rask/src/all/gcc/targhooks.c:595 #2 0x00000000006bca5c in secondary_reload_class (in_p=1 '\001', class=GPR_REGS, mode=VOIDmode, x=0x7) at /n/12/rask/src/all/gcc/reload.c:525 #3 0x00000000006aa82f in init_regs () at /n/12/rask/src/all/gcc/regclass.c:1285 #4 0x0000000000737032 in backend_init_target () at /n/12/rask/src/all/gcc/toplev.c:2040 #5 0x000000000073751a in toplev_main (argc=<value optimized out>, argv=<value optimized out>) at /n/12/rask/src/all/gcc/toplev.c:2086 #6 0x00002b0f0ea1d4ca in __libc_start_main () from /lib/libc.so.6 #7 0x0000000000403c2a in _start () at ../sysdeps/x86_64/elf/start.S:113 (gdb) fin Run till exit from #0 frv_secondary_reload_class (class=ICC_REGS, mode=BImode, x=0x2b0f0ec48d80, in_p=0) at /n/12/rask/src/all/gcc/config/frv/frv.c:6347 default_secondary_reload (in_p=0 '\0', x=0x2b0f0ec48d80, reload_class=GPR_REGS, reload_mode=BImode, sri=0x7fff9c430880) at /n/12/rask/src/all/gcc/targhooks.c:597 Value returned is $16 = GPR_REGS The next few lines of code read: if (class != NO_REGS) { enum insn_code icode = (in_p ? reload_in_optab[(int) reload_mode] : reload_out_optab[(int) reload_mode]); (gdb) print icode $19 = 0 (gdb) print insn_data[0]->name $20 = 0xb8e5ba "*movqi_load" (gdb) print insn_data[0]->n_operands $21 = 2 '\002' I.e. we get the wrong icode. (gdb) print reload_in_optab $22 = {0 <repeats 45 times>} (gdb) print reload_out $23 = {0 <repeats 45 times>} I would have expected a default of CODE_FOR_nothing, not 0. I think this is a problem with the new lazy optab initialization. We now call backend_init_target() and init_regs() before calling init_optabs(). -- rask at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Component|target |middle-end http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34226