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