diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2010-09-08 21:53:48 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2010-09-08 21:53:48 +0000 |
commit | 359bea1da45819206bf0a9132362ee6e0f181282 (patch) | |
tree | 51a704702b2ef87537d068e5ea5a55d72cb03512 /gcc/tree.c | |
parent | 0a7822a32b830084f37e78545047ce0d4e5cd486 (diff) | |
download | gcc-359bea1da45819206bf0a9132362ee6e0f181282.zip gcc-359bea1da45819206bf0a9132362ee6e0f181282.tar.gz gcc-359bea1da45819206bf0a9132362ee6e0f181282.tar.bz2 |
re PR debug/45419 (-fcompare-debug failure at -O3)
PR debug/45419
PR debug/45408
* tree-pretty-print.c (dump_generic_node): Disregard top-level
qualifiers in otherwise equal MEM_REF pointer types.
* fold-const.c (operand_equal_p): Compare pointer type of MEM_REFs.
* tree.c (iterative_hash_expr): Hash the pointer type of MEM_REFs.
From-SVN: r164031
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -6768,6 +6768,21 @@ iterative_hash_expr (const_tree t, hashval_t val) } return val; } + case MEM_REF: + { + /* The type of the second operand is relevant, except for + its top-level qualifiers. */ + tree type = TYPE_MAIN_VARIANT (TREE_TYPE (TREE_OPERAND (t, 1))); + + val = iterative_hash_object (TYPE_HASH (type), val); + + /* We could use the standard hash computation from this point + on. */ + val = iterative_hash_object (code, val); + val = iterative_hash_expr (TREE_OPERAND (t, 1), val); + val = iterative_hash_expr (TREE_OPERAND (t, 0), val); + return val; + } case FUNCTION_DECL: /* When referring to a built-in FUNCTION_DECL, use the __builtin__ form. Otherwise nodes that compare equal according to operand_equal_p might |