public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "msebor at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/99919] New: [9/10/11 Regression] bogus -Wmaybe-uninitialized with a _Bool bit-field Date: Mon, 05 Apr 2021 20:29:06 +0000 [thread overview] Message-ID: <bug-99919-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99919 Bug ID: 99919 Summary: [9/10/11 Regression] bogus -Wmaybe-uninitialized with a _Bool bit-field Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: msebor at gcc dot gnu.org Target Milestone: --- This is the -Wmaybe-uninitialized subset of pr99918 showing how the failure to fail _Bool bit-field expressions can cause bogus warnings. (Like pr99918, this was most likely caused by r225825.) $ cat z.c && gcc -O2 -S -Wall z.c struct B { _Bool i: 1; _Bool j: 1; }; _Bool z; void g (struct B b) { _Bool x; if (b.i) b.j = 0; else { b.j = b.i; x = b.i; } if (b.j) z = x; } z.c: In function ‘g’: z.c:18:7: warning: ‘x’ may be used uninitialized in this function [-Wmaybe-uninitialized] 18 | z = x; | ~~^~~ z.c:7:9: note: ‘x’ was declared here 7 | _Bool x; | ^
next reply other threads:[~2021-04-05 20:29 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-05 20:29 msebor at gcc dot gnu.org [this message] 2021-04-05 20:51 ` [Bug tree-optimization/99919] " msebor at gcc dot gnu.org 2021-04-06 8:39 ` rguenth at gcc dot gnu.org 2021-04-08 14:22 ` rguenth at gcc dot gnu.org 2021-06-01 8:20 ` [Bug tree-optimization/99919] [9/10/11/12 " rguenth at gcc dot gnu.org 2021-11-30 11:58 ` aldyh at gcc dot gnu.org 2021-11-30 12:06 ` pinskia at gcc dot gnu.org 2021-11-30 14:22 ` aldyh at gcc dot gnu.org 2022-12-08 9:25 ` [Bug tree-optimization/99919] [10/11/12/13 " rguenth at gcc dot gnu.org 2022-12-08 10:47 ` rguenth at gcc dot gnu.org 2023-04-26 6:55 ` [Bug tree-optimization/99919] [10/11/12/13/14 " rguenth at gcc dot gnu.org 2023-07-27 9:22 ` [Bug tree-optimization/99919] [11/12/13/14 " rguenth at gcc dot gnu.org 2023-12-15 13:33 ` rguenth at gcc dot gnu.org 2024-05-21 9:10 ` [Bug tree-optimization/99919] [11/12/13/14/15 " 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-99919-4@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).