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/104060] [11/12 Regression] -Wmaybe-uninitialized false alarm on address of local array Date: Mon, 17 Jan 2022 03:49:32 +0000 [thread overview] Message-ID: <bug-104060-4-VV37TgHnh6@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-104060-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104060 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Last reconfirmed| |2022-01-17 Known to work| |10.3.0 Summary|-Wmaybe-uninitialized false |[11/12 Regression] |alarm on address of local |-Wmaybe-uninitialized false |array |alarm on address of local | |array Known to fail| |11.1.0 Keywords| |diagnostic Target Milestone|--- |11.3 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Confirmed reduced further: void *ptr_align (void const *ptr, unsigned long alignment); int j (void) { unsigned char j[10000]; unsigned char *k = ptr_align (j, 1024); return !k; } The warning is suspect to make sure you have accessed something inside j before the call to ptr_align but it looks like the warning just produces false positive 100% of the time in this testcase and there is no way for the warning to be shut up correctly.. There is no way for GCC to know what ptr_align does, GCC thinks it reads from the first argument but it does not. Note my recommendation to how to fix this is we should just revert this warning which was added for GCC 11 and close the original bug which asks about this warning as won't fix.
next prev parent reply other threads:[~2022-01-17 3:49 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-01-17 3:41 [Bug tree-optimization/104060] New: " eggert at cs dot ucla.edu 2022-01-17 3:49 ` pinskia at gcc dot gnu.org [this message] 2022-01-17 8:45 ` [Bug tree-optimization/104060] [11/12 Regression] " rguenth at gcc dot gnu.org 2022-04-21 7:51 ` rguenth at gcc dot gnu.org 2023-05-29 10:06 ` [Bug tree-optimization/104060] [11/12/13/14 " jakub 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-104060-4-VV37TgHnh6@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).