public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/63701] New: trans-expr.c:1424: missing init for local variable "found"
@ 2014-10-31 16:35 dcb314 at hotmail dot com
2014-10-31 16:52 ` [Bug fortran/63701] " ktkachov at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: dcb314 at hotmail dot com @ 2014-10-31 16:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63701
Bug ID: 63701
Summary: trans-expr.c:1424: missing init for local variable
"found"
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
../../src/trunk/gcc/fortran/trans-expr.c:1424:25: warning: variable 'found' is
used uninitialized whenever 'for' loop exits because its condition is false
[-Wsometimes-uninitialized]
$ fgrep -n found gcc/fortran/trans-expr.c
1409: bool found;
1438: found = true;
1442: gcc_assert (found && caf_decl);
Missing init of "found" to false at line 1409.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/63701] trans-expr.c:1424: missing init for local variable "found"
2014-10-31 16:35 [Bug fortran/63701] New: trans-expr.c:1424: missing init for local variable "found" dcb314 at hotmail dot com
@ 2014-10-31 16:52 ` ktkachov at gcc dot gnu.org
2014-11-11 11:53 ` ktkachov at gcc dot gnu.org
2014-11-11 11:56 ` ktkachov at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2014-10-31 16:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63701
ktkachov at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-10-31
CC| |ktkachov at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from ktkachov at gcc dot gnu.org ---
found is expected to be always set to true at line 1438, that's what the
gcc_assert is for. But I agree that it should be initialised to false.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/63701] trans-expr.c:1424: missing init for local variable "found"
2014-10-31 16:35 [Bug fortran/63701] New: trans-expr.c:1424: missing init for local variable "found" dcb314 at hotmail dot com
2014-10-31 16:52 ` [Bug fortran/63701] " ktkachov at gcc dot gnu.org
@ 2014-11-11 11:53 ` ktkachov at gcc dot gnu.org
2014-11-11 11:56 ` ktkachov at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2014-11-11 11:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63701
--- Comment #2 from ktkachov at gcc dot gnu.org ---
Author: ktkachov
Date: Tue Nov 11 11:52:36 2014
New Revision: 217345
URL: https://gcc.gnu.org/viewcvs?rev=217345&root=gcc&view=rev
Log:
[Fortran] PR 63701 Make sure variable is always used initialised
PR fortran/63701
* trans-expr.c (gfc_get_tree_for_caf_expr): Initialise found to false.
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-expr.c
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/63701] trans-expr.c:1424: missing init for local variable "found"
2014-10-31 16:35 [Bug fortran/63701] New: trans-expr.c:1424: missing init for local variable "found" dcb314 at hotmail dot com
2014-10-31 16:52 ` [Bug fortran/63701] " ktkachov at gcc dot gnu.org
2014-11-11 11:53 ` ktkachov at gcc dot gnu.org
@ 2014-11-11 11:56 ` ktkachov at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2014-11-11 11:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63701
ktkachov at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from ktkachov at gcc dot gnu.org ---
Fixed on trunk.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-11-11 11:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-31 16:35 [Bug fortran/63701] New: trans-expr.c:1424: missing init for local variable "found" dcb314 at hotmail dot com
2014-10-31 16:52 ` [Bug fortran/63701] " ktkachov at gcc dot gnu.org
2014-11-11 11:53 ` ktkachov at gcc dot gnu.org
2014-11-11 11:56 ` ktkachov 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).