re PR c++/70906 (ice in add_expr, at tree.c:7925)
authorJakub Jelinek <jakub@redhat.com>
Wed, 4 May 2016 20:44:40 +0000 (22:44 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 4 May 2016 20:44:40 +0000 (22:44 +0200)
commit2d1ac15a6abfe3cf5cd6ee92a3d8960bd9fb1af8
treec73a1cb4d2e0eead0a6bf4402be2850902e37cab
parente4ea422a005d67594f66a8986d930f623c46b200
re PR c++/70906 (ice in add_expr, at tree.c:7925)

PR c++/70906
PR c++/70933
* tree-core.h (enum operand_equal_flag): Add OEP_HASH_CHECK.
* tree.c (inchash::add_expr): If !IS_EXPR_CODE_CLASS (tclass),
assert flags & OEP_HASH_CHECK, instead of asserting it
never happens.  Handle TARGET_EXPR.
* fold-const.c (operand_equal_p): For hash verification,
or in OEP_HASH_CHECK into flags.

* g++.dg/opt/pr70906.C: New test.
* g++.dg/opt/pr70933.C: New test.

From-SVN: r235902
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/opt/pr70906.C [new file with mode: 0644]
gcc/testsuite/g++.dg/opt/pr70933.C [new file with mode: 0644]
gcc/tree-core.h
gcc/tree.c