aboutsummaryrefslogtreecommitdiff
path: root/libcpp/include/cpplib.h
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2022-08-19 15:11:14 +0200
committerRichard Biener <rguenther@suse.de>2022-09-29 09:34:00 +0200
commita1cd4d52d6ef90b977fb2d80c1cf17f3efa5b01d (patch)
tree67f6b47a8a794aa643f366698bf2ee4e8407d691 /libcpp/include/cpplib.h
parentf758d447d7f4699253c9f8ee345ba9b8357cdb22 (diff)
downloadgcc-a1cd4d52d6ef90b977fb2d80c1cf17f3efa5b01d.zip
gcc-a1cd4d52d6ef90b977fb2d80c1cf17f3efa5b01d.tar.gz
gcc-a1cd4d52d6ef90b977fb2d80c1cf17f3efa5b01d.tar.bz2
tree-optimization/105646 - re-interpret always executed in uninit diag
The following fixes PR105646, not diagnosing int f1(); int f3(){ auto const & a = f1(); bool v3{v3}; return a; } with optimization because the early uninit diagnostic pass only diagnoses always executed cases. The patch does this by re-interpreting what always executed means and choosing to ignore exceptional and abnormal control flow for this. At the same time it improves things as suggested in a comment - when the value-numbering run done without optimizing figures there's a fallthru path, consider blocks on it as always executed. PR tree-optimization/105646 * tree-ssa-uninit.cc (warn_uninitialized_vars): Pre-compute the set of fallthru reachable blocks from function entry and use that to determine wlims.always_executed. * g++.dg/uninit-pr105646.C: New testcase.
Diffstat (limited to 'libcpp/include/cpplib.h')
0 files changed, 0 insertions, 0 deletions