public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/105646] g++ does not raise "xxx may be used uninitialized" warning on dead code when optimizing Date: Thu, 29 Sep 2022 08:24:02 +0000 [thread overview] Message-ID: <bug-105646-4-tLwRGpHKNo@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-105646-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105646 --- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>: https://gcc.gnu.org/g:a1cd4d52d6ef90b977fb2d80c1cf17f3efa5b01d commit r13-2926-ga1cd4d52d6ef90b977fb2d80c1cf17f3efa5b01d Author: Richard Biener <rguenther@suse.de> Date: Fri Aug 19 15:11:14 2022 +0200 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.
next prev parent reply other threads:[~2022-09-29 8:24 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-05-18 14:07 [Bug c++/105646] New: g++ does not raise xxx is used uninitialized warning under some conditions cfy1990 at gmail dot com 2022-05-18 14:13 ` [Bug c++/105646] " cfy1990 at gmail dot com 2022-09-29 8:24 ` cvs-commit at gcc dot gnu.org [this message] 2022-09-29 8:24 ` [Bug tree-optimization/105646] g++ does not raise "xxx may be used uninitialized" warning on dead code when optimizing rguenth at gcc dot gnu.org 2022-10-27 0:54 ` pinskia at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-105646-4-tLwRGpHKNo@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).