aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc
diff options
context:
space:
mode:
authorSteve Ellcey <Steve.Ellcey@imgtec.com>2015-06-02 09:20:30 -0700
committerSteve Ellcey <Steve.Ellcey@imgtec.com>2015-06-02 09:20:30 -0700
commit00eea35e8107e50c4a5f569385646ae09f4e47fc (patch)
treeebbc697c70742593d43ad28c1beed12bc1adab30 /gcc-4.9/gcc
parent4db4241dd512cf274d07b301215c715abfd9559f (diff)
downloadtoolchain_gcc-00eea35e8107e50c4a5f569385646ae09f4e47fc.tar.gz
toolchain_gcc-00eea35e8107e50c4a5f569385646ae09f4e47fc.tar.bz2
toolchain_gcc-00eea35e8107e50c4a5f569385646ae09f4e47fc.zip
Fix bug where force_const_mem may return NULL_RTX.
Change-Id: I54a6469aa140e7b24853237ac51398f8e8f4ea95
Diffstat (limited to 'gcc-4.9/gcc')
-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;