]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/109434 - bogus DSE of throwing call LHS
authorRichard Biener <rguenther@suse.de>
Tue, 11 Apr 2023 13:06:59 +0000 (15:06 +0200)
committerRichard Biener <rguenther@suse.de>
Wed, 12 Apr 2023 06:48:23 +0000 (08:48 +0200)
commit6e3e708dbadaae7b504af7fc4410015624793f02
tree00784ed72f08b3dcd2d7c080239706c3ff8d741d
parent5582ad0afb051a76231b2959487f4ef1746df283
tree-optimization/109434 - bogus DSE of throwing call LHS

The byte tracking of call LHS didn't properly handle possibly
throwing calls correctly which cases bogus DSE and in turn, for the
testcase a bogus uninit diagnostic and (unreliable) wrong-code.

PR tree-optimization/109434
* tree-ssa-dse.cc (initialize_ao_ref_for_dse): Properly
handle possibly throwing calls when processing the LHS
and may-defs are not OK.

* g++.dg/opt/pr109434.C: New testcase.
gcc/testsuite/g++.dg/opt/pr109434.C [new file with mode: 0644]
gcc/tree-ssa-dse.cc