diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-04-07 10:13:25 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-04-07 10:13:25 +0000 |
commit | 6d72287b7ad40b4ebac984afcab7c2ee3577aed4 (patch) | |
tree | 73257bbd69a5a06f1b84a4d755f735c5fa36e36c /gcc/fold-const.c | |
parent | b2e3737c0119de5dde1b562d6c40cc86f6b9e6bb (diff) | |
download | gcc-6d72287b7ad40b4ebac984afcab7c2ee3577aed4.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158045 138bc75d-0d04-0410-961f-82ee72b054a4
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 e79d934243d..62c86254ea1 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) |