aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-04-07 10:13:25 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2010-04-07 10:13:25 +0000
commit56c47f227103ba589fc246c6bee47d0fca8afaaf (patch)
tree73257bbd69a5a06f1b84a4d755f735c5fa36e36c /gcc/tree.c
parenta42f12170922d13a8ecb5b0d9043c0b929bec957 (diff)
downloadgcc-56c47f227103ba589fc246c6bee47d0fca8afaaf.zip
gcc-56c47f227103ba589fc246c6bee47d0fca8afaaf.tar.gz
gcc-56c47f227103ba589fc246c6bee47d0fca8afaaf.tar.bz2
re PR rtl-optimization/42617 (TARGET_MEM_REF and plain INDIRECT_REFs are not handled by the RTL oracle)
2010-04-07 Richard Guenther <rguenther@suse.de> PR middle-end/42617 * emit-rtl.c (set_mem_attributes_minus_bitpos): Do not discard plain indirect references. * fold-const.c (operand_equal_p): Guard against NULL_TREE type. * tree.c (tree_nop_conversion): Likewise. From-SVN: r158045
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 863b51e..b72e057 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -10645,6 +10645,9 @@ tree_nop_conversion (const_tree exp)
outer_type = TREE_TYPE (exp);
inner_type = TREE_TYPE (TREE_OPERAND (exp, 0));
+ if (!inner_type)
+ return false;
+
/* Use precision rather then machine mode when we can, which gives
the correct answer even for submode (bit-field) types. */
if ((INTEGRAL_TYPE_P (outer_type)