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().
Again:
ejb227:~/gcc dalecki$ svngrep branch_target_register_class
.//gcc/bt-load.c: enum reg_class class = (enum reg_class)
targetm.branch_target_register_class ();
.//gcc/ChangeLog-2003: * target.h (branch_target_register_class):
Change return type to int.
.//gcc/ChangeLog-2003: * target.h (struct gcc_target): Add
branch_target_register_class
.//gcc/target.h: int (* branch_target_register_class) (void);
Let's check who calls branch_target_load_optmize()...
We can see that all calls are guarded by
flag_branch_target_load_optimize
and a corresponding report option:
gcc/common.opt:Common Report Var(flag_branch_target_load_optimize)
Enabing this option is going to crash the compiler miserable.
Looking at the use of flag_brnach_target_load_optmize2 I think all of
the
associated code should be simply deleted.
Marcin Dalecki