------- Comment #11 from uweigand at gcc dot gnu dot org 2008-01-21 18:54 ------- The secondary reload hook does not need to make the decision whether or not indexed addresses are allowed; that decision has already been taken.
The purpose of the secondary reload hook is simply to do whatever it takes to load an indexed address into a base register (after reload has already decided that this address needs to be loaded). Reload does not allocate scratch registers always since it assumes that targets provide a "load address" instruction that it able to perform this operation without scratch register. You need the secondary reload to let common code know that this doesn't work on your target. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34529