On Sun, Jan 22, 2006 at 05:00:34PM +0100, Marcin Dalecki wrote: > Inside gcc/target.h we have the declaration of > struct gcc_target { struct asm_out { struct sched { ... > there is a function refernce field named > > int (* branch_target_register_class) (void); > > The only place where this is referenced is in gcc/bt-load.c > and in esp the global branch_target_load_optimize() function. > Right away at the start. However there is no initialization of > brnach_target_register_class at all anywhere. > This of course will let the compiler crash on *every* call > to branch_target_load_optimize().
If this were true, it would have been very easy to check: pass the option, watch the compiler crash. Did you try it? - It's not in struct sched, which is not in struct asm_out. - If you'd loaded up the compiler in GDB you'd probably have seen it initialized to hook_int_void_no_regs. - This comes from TARGET_BRANCH_TARGET_REGISTER_CLASS. - SH redefines that to sh_target_reg_class. -- Daniel Jacobowitz CodeSourcery