public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/81714] incorrect location for uninitialised variable
[not found] <bug-81714-4@http.gcc.gnu.org/bugzilla/>
@ 2021-04-02 17:38 ` msebor at gcc dot gnu.org
2021-04-15 17:12 ` msebor at gcc dot gnu.org
1 sibling, 0 replies; 2+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-04-02 17:38 UTC (permalink / raw)
To: gcc-bugs
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).
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/81714] incorrect location for uninitialised variable
[not found] <bug-81714-4@http.gcc.gnu.org/bugzilla/>
2021-04-02 17:38 ` [Bug c++/81714] incorrect location for uninitialised variable msebor at gcc dot gnu.org
@ 2021-04-15 17:12 ` msebor at gcc dot gnu.org
1 sibling, 0 replies; 2+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-04-15 17:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81714
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |skvadrik at gmail dot com
--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
*** Bug 60741 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-15 17:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-81714-4@http.gcc.gnu.org/bugzilla/>
2021-04-02 17:38 ` [Bug c++/81714] incorrect location for uninitialised variable msebor at gcc dot gnu.org
2021-04-15 17:12 ` msebor at gcc dot gnu.org
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).