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/106922] [12/13 Regression] Bogus uninitialized warning on boost::optional<<std::vector<std::string>>> Date: Tue, 13 Sep 2022 09:13:50 +0000 [thread overview] Message-ID: <bug-106922-4-NvgORiHfh7@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-106922-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106922 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P2 Last reconfirmed| |2022-09-13 Status|UNCONFIRMED |ASSIGNED Target Milestone|--- |12.3 Blocks| |24639 Ever confirmed|0 |1 Keywords| |diagnostic, | |missed-optimization Summary|[12 Regression] Bogus |[12/13 Regression] Bogus |uninitialized warning on |uninitialized warning on |boost::optional<<std::vecto |boost::optional<<std::vecto |r<std::string>>> |r<std::string>>> Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed also on trunk and also with -O1 and the usual suspects -fno-ivopts -fno-thread-jumps. The question is whether external = internal; is problematic. For example struct MyStruct { }; std::vector<MyStruct> getMyStructs(); void test() { Optional<std::vector<std::string>> external; Optional<std::vector<std::string>> internal; external = internal; } is diagnosed with -std=c++20 -O -Wuninitialized -fno-tree-fre -fno-tree-dominator-opts that's because we then no longer forward the uninit state of the Optionals and thus diagnose the conditional (on initialized) <bb 6> [local count: 118702158]: _34 = MEM[(struct vector *)&external + 8B].D.88471._M_impl.D.87778._M_finish; _35 = MEM[(struct vector *)&external + 8B].D.88471._M_impl.D.87778._M_start; if (_34 != _35) goto <bb 41>; [89.00%] ... the same happens with the unreduced testcase, there we have similar code conditional on external.m_initialized where we are not able to forward the m_initialized state. It might be the bisected rev. causes a missed optimization here, I will have to check. At least I don't see a good reason why we don't forward it here. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24639 [Bug 24639] [meta-bug] bug to track all Wuninitialized issues
next prev parent reply other threads:[~2022-09-13 9:13 UTC|newest] Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-09-13 8:18 [Bug tree-optimization/106922] New: [12 " jan.zizka at nokia dot com 2022-09-13 9:13 ` rguenth at gcc dot gnu.org [this message] 2022-09-15 7:55 ` [Bug tree-optimization/106922] [12/13 Regression] Bogus uninitialized warning on boost::optional<<std::vector<std::string>>>, missed FRE rguenth at gcc dot gnu.org 2022-09-15 8:41 ` rguenth at gcc dot gnu.org 2022-09-15 11:26 ` rguenth at gcc dot gnu.org 2022-09-15 11:56 ` rguenth at gcc dot gnu.org 2022-09-15 11:57 ` rguenth at gcc dot gnu.org 2022-09-15 12:12 ` jan.zizka at nokia dot com 2022-09-15 12:36 ` cvs-commit at gcc dot gnu.org 2022-09-15 12:38 ` [Bug tree-optimization/106922] [12 " rguenth at gcc dot gnu.org 2022-09-15 22:13 ` jan.zizka at nokia dot com 2022-09-19 14:16 ` rguenth at gcc dot gnu.org 2022-09-19 15:03 ` jan.zizka at nokia dot com 2022-09-21 6:55 ` rguenth at gcc dot gnu.org 2022-09-21 12:52 ` rguenth at gcc dot gnu.org 2022-09-22 11:10 ` cvs-commit at gcc dot gnu.org 2022-09-22 11:11 ` rguenth at gcc dot gnu.org 2022-09-23 7:48 ` cvs-commit at gcc dot gnu.org 2022-09-23 11:31 ` jan.zizka at nokia dot com 2022-09-23 11:59 ` rguenth at gcc dot gnu.org 2022-09-23 13:11 ` cvs-commit at gcc dot gnu.org 2022-09-23 13:14 ` rguenth at gcc dot gnu.org 2022-09-23 14:22 ` jan.zizka at nokia dot com 2022-10-11 12:06 ` cvs-commit at gcc dot gnu.org 2022-10-11 12:08 ` rguenth at gcc dot gnu.org 2022-10-11 13:13 ` jan.zizka at nokia dot com 2022-10-13 7:44 ` rguenther at suse dot de 2022-10-13 10:50 ` jan.zizka at nokia dot com 2022-10-17 13:10 ` cvs-commit at gcc dot gnu.org 2022-10-17 13:10 ` cvs-commit at gcc dot gnu.org 2022-10-17 13:10 ` cvs-commit at gcc dot gnu.org 2022-10-17 13:14 ` rguenth 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-106922-4-NvgORiHfh7@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).