------- Comment #7 from daney at gcc dot gnu dot org 2007-09-04 05:46 ------- Here is what is happening:
The value of avenrun[0] is being passed to a function that takes an 32 bit int parameter. Since avenrun is an array of 64 bit unsigned long, the conversion to int can be done by loading an int from avenrun + 4. In mips_symbolic_constant_p() we call offset_within_block_p(avenrun, 4) which returns false because avenrun is an array of undetermined length. If the length turns out to be zero, then an offset of 4 would fall outside of the array. I don't really know how to fix this. We could get rid of the offset_within_block_p() check all together (which could cause undiagnosed bad code in other circumstances), or we could assume that if symbol is an array, and the offset falls in the first element that it is OK. Perhaps Richard will have some ideas here... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33256