tree-optimization/90994 - fix uninit diagnostics with EH
authorRichard Biener <rguenther@suse.de>
Wed, 31 Aug 2022 12:04:46 +0000 (14:04 +0200)
committerRichard Biener <rguenther@suse.de>
Wed, 31 Aug 2022 13:20:41 +0000 (15:20 +0200)
commit88f29a8aa82f2788baf2f9865940d4c83012c580
treeb60c09aad26b08a142caa6a891af72566709b0a2
parent25dd2768afdb8fad7b11d511eb5f739958f9870d
tree-optimization/90994 - fix uninit diagnostics with EH

r12-3640-g94c12ffac234b2 sneaked in a hack to avoid the diagnostic
for the testcase in PR90994 which sees non-call EH control flow
confusing predicate analysis.  The following patch instead adjusts
the existing code handling EH to handle non-calls and do what I
think was intented.

PR tree-optimization/90994
* gimple-predicate-analysis.cc (predicate::init_from_control_deps):
Ignore exceptional control flow and skip the edge for the purpose of
predicate generation also for non-calls.

* g++.dg/torture/pr90994.C: New testcase.
gcc/gimple-predicate-analysis.cc
gcc/testsuite/g++.dg/torture/pr90994.C [new file with mode: 0644]