diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/explow.c | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index baeaef5..4c8c609 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-06-03 Andrew Bennett <andrew.bennett@imgtec.com> + + * explow.c (plus_constant): Update check after force_const_mem call + to see if the value returned is not a NULL_RTX. + 2015-06-03 Ilya Enkovich <ilya.enkovich@intel.com> * ipa.c (symbol_table::remove_unreachable_nodes): Don't diff --git a/gcc/explow.c b/gcc/explow.c index d1a2bf8..8745aea 100644 --- a/gcc/explow.c +++ b/gcc/explow.c @@ -132,7 +132,9 @@ plus_constant (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; |