aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/explow.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/explow.c')
-rw-r--r--gcc-4.9/gcc/explow.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc-4.9/gcc/explow.c b/gcc-4.9/gcc/explow.c
index 48e91a644..4e0aedf6b 100644
--- a/gcc-4.9/gcc/explow.c
+++ b/gcc-4.9/gcc/explow.c
@@ -137,7 +137,9 @@ plus_constant (enum machine_mode mode, rtx x, HOST_WIDE_INT c)
{
tem = plus_constant (mode, get_pool_constant (XEXP (x, 0)), c);
tem = force_const_mem (GET_MODE (x), tem);
- if (memory_address_p (GET_MODE (tem), XEXP (tem, 0)))
+ /* Targets may disallow some constants in the constant pool, thus
+ force_const_mem may return NULL_RTX. */
+ if (tem && memory_address_p (GET_MODE (tem), XEXP (tem, 0)))
return tem;
}
break;