public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108667] Spurious "may be used uninitialized [-Wmaybe-uninitialized]" warning Date: Sat, 04 Feb 2023 00:07:10 +0000 [thread overview] Message-ID: <bug-108667-4-jWEYgPU9oS@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-108667-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108667 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- This is partly caused by not inlining everything as main is marked as called once. If instead I call main, main1, the warning goes away and the following call is inlined now: std::_Function_handler<void(), main()::<lambda()> >::_M_manager (&MEM[(struct function *)&s + 32B].D.47025._M_functor, &D.47426.D.47025._M_functor, 2); The warning in this case is about D.47426 which does not have any initialization before the call here. Note the call with last operand as 2 does not actually do anything and just returns. I don't know the best way to solve this specific case as it depends on inlining heurstics. Question for the reporter, was this a reduction from some real code or did you just notice the warning while testing some code?
next prev parent reply other threads:[~2023-02-04 0:07 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-02-03 22:02 [Bug c++/108667] New: Spurious "maybe " alvaro.begue at gmail dot com 2023-02-04 0:07 ` pinskia at gcc dot gnu.org [this message] 2023-02-04 0:33 ` [Bug tree-optimization/108667] Spurious "may be " alvaro.begue at gmail dot com 2023-02-06 7:47 ` rguenth at gcc dot gnu.org 2023-02-06 15:19 ` alvaro.begue at gmail dot com
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-108667-4-jWEYgPU9oS@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).