On 06/02/2015 08:19 AM, Andrew Bennett wrote:
Hi,
In the plus_constant function in explow.c the code to update a constant pool
value
does not deal with the case where the value returned from force_const_mem is a
NULL_RTX. This occurs for the MIPS target because its
cannot_force_const_mem target function does not allow constants (so that the
move expanders can deal with them later on), this then causes the
force_const_mem
function to return a NULL_RTX and then causes GCC to segmentation fault when
calling
the memory_address_p function.
The fix is to add a check that the tem variable is not a NULL_RTX before
the memory_address_p function call. I have tested the fix on the
mips-mti-linux-gnu
target for both mips32r2 o32 and mips64r2 n64 and there have been no
regressions.
The patch and ChangeLog are below.
Ok to commit?
Many thanks,
Andrew
* explow.c (plus_constant): Update check after force_const_mem call to
see if the
value returned is not a NULL_RTX.
OK. Please install.
Thanks,
Jeff