re PR sanitizer/70683 (-fcompare-debug bug with -fsanitize=address)
authorJakub Jelinek <jakub@redhat.com>
Wed, 27 Apr 2016 07:45:57 +0000 (09:45 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 27 Apr 2016 07:45:57 +0000 (09:45 +0200)
commit108b7b2901d2cc52b090f89a4ccfa520e52270ba
treeee16a1291dde4c097179af800ec0f645b1f22d8d
parent1ee806d8d759be9c7326ce55b472f326089b47f0
re PR sanitizer/70683 (-fcompare-debug bug with -fsanitize=address)

PR sanitizer/70683
* tree.h (inchash::add_expr): Add FLAGS argument.
* tree.c (inchash::add_expr): Likewise.  If not OEP_ADDRESS_OF,
use STRIP_NOPS first.  For INTEGER_CST assert not OEP_ADDRESS_OF.
For REAL_CST and !HONOR_SIGNED_ZEROS (t) hash +/- 0 the same.
Formatting fix.  Adjust recursive calls.  For tcc_comparison,
if swap_tree_comparison (code) is smaller than code, hash that
and arguments in the other order.  Hash CONVERT_EXPR the same
as NOP_EXPR.  For OEP_ADDRESS_OF hash MEM_REF with 0 offset
of ADDR_EXPR of decl as the decl itself.  Add or remove
OEP_ADDRESS_OF from recursive flags as needed.  For
FMA_EXPR, WIDEN_MULT_{PLUS,MINUS}_EXPR hash the first two
operands commutatively and only the third one normally.
For internal CALL_EXPR hash in CALL_EXPR_IFN.

From-SVN: r235469
gcc/ChangeLog
gcc/tree.c
gcc/tree.h