]> git.ipfire.org Git - thirdparty/gcc.git/commit
ipa/111245 - bogus modref analysis for store in call that might throw
authorRichard Biener <rguenther@suse.de>
Fri, 28 Feb 2025 10:44:26 +0000 (11:44 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 28 Feb 2025 12:37:54 +0000 (13:37 +0100)
commite6037af6d5e5a43c437257580d75bc8b35a6dcfd
treebd28690d87ddd3ba7a93fbcc567575885843db23
parent26e4783c707a96ebb42c6ec4537578e635974573
ipa/111245 - bogus modref analysis for store in call that might throw

We currently record a kill for

  *x_4(D) = always_throws ();

because we consider the store always executing since the appropriate
check for whether the stmt could throw is guarded by
!cfun->can_throw_non_call_exceptions.

PR ipa/111245
* ipa-modref.cc (modref_access_analysis::analyze_store): Do
not guard the check of whether the stmt could throw by
cfun->can_throw_non_call_exceptions.

* g++.dg/torture/pr111245.C: New testcase.
gcc/ipa-modref.cc
gcc/testsuite/g++.dg/torture/pr111245.C [new file with mode: 0644]