diff options
author | Richard Guenther <rguenther@suse.de> | 2010-04-07 10:13:25 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2010-04-07 10:13:25 +0000 |
commit | 56c47f227103ba589fc246c6bee47d0fca8afaaf (patch) | |
tree | 73257bbd69a5a06f1b84a4d755f735c5fa36e36c /gcc/fold-const.c | |
parent | a42f12170922d13a8ecb5b0d9043c0b929bec957 (diff) | |
download | gcc-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/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index e79d934..62c8625 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -3170,6 +3170,11 @@ operand_equal_p (const_tree arg0, const_tree arg1, unsigned int flags) || TREE_TYPE (arg1) == error_mark_node) return 0; + /* Similar, if either does not have a type (like a released SSA name), + they aren't equal. */ + if (!TREE_TYPE (arg0) || !TREE_TYPE (arg1)) + return 0; + /* Check equality of integer constants before bailing out due to precision differences. */ if (TREE_CODE (arg0) == INTEGER_CST && TREE_CODE (arg1) == INTEGER_CST) |