public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/93432] variable is used uninitialized, but gcc shows no warning Date: Wed, 31 Aug 2022 13:44:00 +0000 [thread overview] Message-ID: <bug-93432-4-Or2ZZlZbnc@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-93432-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93432 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|c |tree-optimization Keywords|easyhack | --- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> --- It works by chance when optimizing but not optimizing too much. -O3 unrolls the loop and runs into CCP aka PR18501, we get <bb 2> [local count: 97603129]: if (y_5(D) <= 9) goto <bb 18>; [33.00%] else goto <bb 19>; [67.00%] <bb 18> [local count: 32209032]: _11 = z_6(D) + 1; <bb 19> [local count: 97603129]: # prephitmp_17 = PHI <2(2), _11(18)> and CCP says _11 is UNDEFINED and merges it with 2 to 2. For me even GCC 9.3.1 warns, so does GCC 7.5, both even with -O3. We do not warn at -O0 but that's by design - we think doing the predicate based uninit analysis early (on the unoptimized IL) would be too noisy.
prev parent reply other threads:[~2022-08-31 13:44 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-93432-4@http.gcc.gnu.org/bugzilla/> 2020-06-08 10:21 ` [Bug c/93432] " manu at gcc dot gnu.org 2020-07-13 12:10 ` manu at gcc dot gnu.org 2022-02-25 15:45 ` vincent-gcc at vinc17 dot net 2022-08-31 13:44 ` rguenth at gcc dot gnu.org [this message]
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-93432-4-Or2ZZlZbnc@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).