From 7739c729cbb032edc59a9c37d2dbfb5293ea7087 Mon Sep 17 00:00:00 2001 From: dberlin Date: Tue, 15 Jul 2008 23:50:52 +0000 Subject: 2008-07-15 Daniel Berlin * tree-ssa-sccvn.c (expressions_equal_p): Check type equality. * tree-ssa-pre.c (pre_expr_eq): Ditto (get_constant_for_value_id): Take a type as an argument. (fully_constant_expression): Pass in type. (find_or_generate_expression): Short circuit constant case. (create_expression_by_pieces): Remove special casing of pointer_plus. (do_regular_insertion): Short circuit constant case. (do_partial_partial_insertion): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137859 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree-ssa-sccvn.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/tree-ssa-sccvn.c') diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c index f1318656b9b..69945a5c3c7 100644 --- a/gcc/tree-ssa-sccvn.c +++ b/gcc/tree-ssa-sccvn.c @@ -2582,6 +2582,8 @@ expressions_equal_p (tree e1, tree e2) te1 = TREE_TYPE (e1); te2 = TREE_TYPE (e2); + if (te1 != te2) + return false; if (TREE_CODE (e1) == TREE_LIST && TREE_CODE (e2) == TREE_LIST) { -- cgit v1.2.1