[Bug tree-optimization/95113] [10/11 Regression] Wrong code w/ -O2 -fexceptions -fnon-call-exceptions
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jun 8 18:16:13 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95113
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Martin Jambor
<jamborm@gcc.gnu.org>:
https://gcc.gnu.org/g:127bf4228d0cb21f28fd5ed4dd820fa4760fc771
commit r10-8264-g127bf4228d0cb21f28fd5ed4dd820fa4760fc771
Author: Martin Jambor <mjambor@suse.cz>
Date: Mon Jun 8 20:15:22 2020 +0200
ipa-sra: Do not remove statements necessary because of non-call EH (PR
95113)
PR 95113 revealed that when reasoning about which parameters are dead,
IPA-SRA does not perform the same check related to non-call exceptions
as tree DCE. It most certainly should and so this patch moves the
condition used in tree-ssa-dce.c into a separate predicate (in
tree-eh.c) and uses it from both places.
gcc/ChangeLog:
2020-05-27 Martin Jambor <mjambor@suse.cz>
PR ipa/95113
* tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Move non-call
exceptions check to...
* tree-eh.c (stmt_unremovable_because_of_non_call_eh_p): ...this
new function.
* tree-eh.h (stmt_unremovable_because_of_non_call_eh_p): Declare
it.
* ipa-sra.c (isra_track_scalar_value_uses): Use it. New parameter
fun.
gcc/testsuite/ChangeLog:
2020-05-27 Martin Jambor <mjambor@suse.cz>
PR ipa/95113
* gcc.dg/ipa/pr95113.c: New test.
(cherry picked from commit 1980ffec48c6fa41396bea66366f2e591798e1e1)
More information about the Gcc-bugs
mailing list