tree.c (iterative_hash_expr): Canonicalize builtins.
2004-12-23 Dale Johannesen <dalej@apple.com> * tree.c (iterative_hash_expr): Canonicalize builtins. From-SVN: r92553
This commit is contained in:
parent
08167d1cdb
commit
d070d4fd52
|
@ -1,3 +1,7 @@
|
||||||
|
2004-12-23 Dale Johannesen <dalej@apple.com>
|
||||||
|
|
||||||
|
* tree.c (iterative_hash_expr): Canonicalize builtins.
|
||||||
|
|
||||||
2004-12-23 Alexandre Oliva <aoliva@redhat.com>
|
2004-12-23 Alexandre Oliva <aoliva@redhat.com>
|
||||||
|
|
||||||
PR target/16819
|
PR target/16819
|
||||||
|
|
14
gcc/tree.c
14
gcc/tree.c
|
@ -4130,12 +4130,24 @@ iterative_hash_expr (tree t, hashval_t val)
|
||||||
for (; t; t = TREE_CHAIN (t))
|
for (; t; t = TREE_CHAIN (t))
|
||||||
val = iterative_hash_expr (TREE_VALUE (t), val);
|
val = iterative_hash_expr (TREE_VALUE (t), val);
|
||||||
return 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 get different
|
||||||
|
hash codes. */
|
||||||
|
if (DECL_BUILT_IN (t))
|
||||||
|
{
|
||||||
|
val = iterative_hash_pointer (built_in_decls[DECL_FUNCTION_CODE (t)],
|
||||||
|
val);
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
/* else FALL THROUGH */
|
||||||
default:
|
default:
|
||||||
class = TREE_CODE_CLASS (code);
|
class = TREE_CODE_CLASS (code);
|
||||||
|
|
||||||
if (class == tcc_declaration)
|
if (class == tcc_declaration)
|
||||||
{
|
{
|
||||||
/* Decls we can just compare by pointer. */
|
/* Otherwise, we can just compare decls by pointer. */
|
||||||
val = iterative_hash_pointer (t, val);
|
val = iterative_hash_pointer (t, val);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue