]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR middle-end/79805 (ICE (verify_flow_info failed) with -fnon-call-exceptions -O)
authorJakub Jelinek <jakub@redhat.com>
Fri, 3 Mar 2017 19:32:01 +0000 (20:32 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 3 Mar 2017 19:32:01 +0000 (20:32 +0100)
commitcc195d46a3368f3ac333709040fd5055061c663f
tree850d9624575d4fb7c5cae0530b162295dd6d438e
parentf325c4567336a2e5c9643e7adb3a152d22022d7d
re PR middle-end/79805 (ICE (verify_flow_info failed) with -fnon-call-exceptions -O)

PR middle-end/79805
* internal-fn.def (ATOMIC_BIT_TEST_AND_SET, ATOMIC_BIT_TEST_AND_RESET,
ATOMIC_BIT_TEST_AND_COMPLEMENT, ATOMIC_COMPARE_EXCHANGE): Remove
ECF_NOTHROW.
* gimple-fold.c (fold_builtin_atomic_compare_exchange): Set
gimple_call_nothrow_p flag based on whether original builtin can throw.
If it can, emit following stmts on the fallthrough edge.
* tree-ssa-ccp.c (optimize_atomic_bit_test_and): Similarly, except
don't create new bb if inserting just debug stmts on the edge, try to
insert them on the fallthru bb or just reset debug stmts.

* g++.dg/opt/pr79805.C: New test.

From-SVN: r245882
gcc/ChangeLog
gcc/gimple-fold.c
gcc/internal-fn.def
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/opt/pr79805.C [new file with mode: 0644]
gcc/tree-ssa-ccp.c