aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndrew Bennett <andrew.bennett@imgtec.com>2015-06-03 09:15:25 +0000
committerAndrew Bennett <abennett@gcc.gnu.org>2015-06-03 09:15:25 +0000
commit2c19378bd99e09f4ee4876a090a884d25cd4e941 (patch)
tree5ae75396fc0cc68da98f1f8daa8d07437ae1f690 /gcc
parent48de5d37c34a0d18b4f0e19e9ab3f661586ae9ee (diff)
downloadgcc-2c19378bd99e09f4ee4876a090a884d25cd4e941.zip
gcc-2c19378bd99e09f4ee4876a090a884d25cd4e941.tar.gz
gcc-2c19378bd99e09f4ee4876a090a884d25cd4e941.tar.bz2
Update check after force_const_mem call in the plus_constant function to see if the value returned is not a NULL_RTX.
2015-06-03 Andrew Bennett <andrew.bennett@imgtec.com> gcc/ * explow.c (plus_constant): Update check after force_const_mem call to see if the value returned is not a NULL_RTX. From-SVN: r224064
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/explow.c4
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;