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 c++/81714] incorrect location for uninitialised variable Date: Fri, 02 Apr 2021 17:38:30 +0000 [thread overview] Message-ID: <bug-81714-4-mXfUZrqxXF@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-81714-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81714 Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Known to fail|6.4.0, 7.3.0, 8.0 |10.2.0, 11.0, 6.3.0, 7.0.1, | |8.3.0, 9.3.0 Last reconfirmed|2018-02-02 00:00:00 |2021-4-2 --- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> --- Reconfirmed with GCC 11. This doesn't look like a problem with -Wuninitialized but rather much earlier. The Gimple dump already has the wrong column number: $ cat pr81714.c && gcc -S -Wall -fdump-tree-gimple-lineno=/dev/stdout -xc++ pr81714.c int f0 () { int i; return i + 1; } int f1 () { int i; return 2 + i; } int f0 () [pr81714.c:4:15] { int D.2352; int i; [pr81714.c:4:14] D.2352 = i + 1; [pr81714.c:4:14] return D.2352; } int f1 () [pr81714.c:10:15] { int D.2354; int i; [pr81714.c:10:14] D.2354 = i + 2; [pr81714.c:10:14] return D.2354; } pr81714.c: In function ‘int f0()’: pr81714.c:4:14: warning: ‘i’ is used uninitialized [-Wuninitialized] 4 | return i + 1; | ^ pr81714.c:3:7: note: ‘i’ was declared here 3 | int i; | ^ pr81714.c: In function ‘int f1()’: pr81714.c:10:14: warning: ‘i’ is used uninitialized [-Wuninitialized] 10 | return 2 + i; | ^ pr81714.c:9:7: note: ‘i’ was declared here 9 | int i; | ^ Other middle-end warnings are also affected (e.g., -Warray-bounds).
next parent reply other threads:[~2021-04-02 17:38 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-81714-4@http.gcc.gnu.org/bugzilla/> 2021-04-02 17:38 ` msebor at gcc dot gnu.org [this message] 2021-04-15 17:12 ` msebor 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-81714-4-mXfUZrqxXF@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).