diff options
author | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-08 21:53:48 +0000 |
---|---|---|
committer | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-08 21:53:48 +0000 |
commit | 87b8feeb617c30ff8ce25bc37593d5d4abc8c9e4 (patch) | |
tree | 51a704702b2ef87537d068e5ea5a55d72cb03512 /gcc/tree-pretty-print.c | |
parent | 8d1af482408ab833e453ad78aba9f7ec6586058f (diff) | |
download | gcc-87b8feeb617c30ff8ce25bc37593d5d4abc8c9e4.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164031 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-pretty-print.c')
-rw-r--r-- | gcc/tree-pretty-print.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c index 44edbb071dd..108a0d18937 100644 --- a/gcc/tree-pretty-print.c +++ b/gcc/tree-pretty-print.c @@ -809,8 +809,8 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags, == TYPE_MODE (TREE_TYPE (TREE_OPERAND (node, 1)))) && (TYPE_REF_CAN_ALIAS_ALL (TREE_TYPE (TREE_OPERAND (node, 0))) == TYPE_REF_CAN_ALIAS_ALL (TREE_TYPE (TREE_OPERAND (node, 1)))) - && (TYPE_QUALS (TREE_TYPE (TREE_OPERAND (node, 0))) - == TYPE_QUALS (TREE_TYPE (TREE_OPERAND (node, 1)))) + && (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_OPERAND (node, 0))) + == TYPE_MAIN_VARIANT (TREE_TYPE (TREE_OPERAND (node, 1)))) /* Same value types ignoring qualifiers. */ && (TYPE_MAIN_VARIANT (TREE_TYPE (node)) == TYPE_MAIN_VARIANT @@ -829,9 +829,12 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags, } else { + tree ptype; + pp_string (buffer, "MEM["); pp_string (buffer, "("); - dump_generic_node (buffer, TREE_TYPE (TREE_OPERAND (node, 1)), + ptype = TYPE_MAIN_VARIANT (TREE_TYPE (TREE_OPERAND (node, 1))); + dump_generic_node (buffer, ptype, spc, flags | TDF_SLIM, false); pp_string (buffer, ")"); dump_generic_node (buffer, TREE_OPERAND (node, 0), @@ -1170,8 +1173,8 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags, == TYPE_MODE (TREE_TYPE (TREE_OPERAND (op0, 1)))) && (TYPE_REF_CAN_ALIAS_ALL (TREE_TYPE (TREE_OPERAND (op0, 0))) == TYPE_REF_CAN_ALIAS_ALL (TREE_TYPE (TREE_OPERAND (op0, 1)))) - && (TYPE_QUALS (TREE_TYPE (TREE_OPERAND (op0, 0))) - == TYPE_QUALS (TREE_TYPE (TREE_OPERAND (op0, 1)))) + && (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_OPERAND (op0, 0))) + == TYPE_MAIN_VARIANT (TREE_TYPE (TREE_OPERAND (op0, 1)))) /* Same value types ignoring qualifiers. */ && (TYPE_MAIN_VARIANT (TREE_TYPE (op0)) == TYPE_MAIN_VARIANT |