public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/42312] New: config/mep/mep.c:2856: (error) Uninitialized variable: frame_size
@ 2009-12-06 18:58 dcb314 at hotmail dot com
2009-12-08 0:48 ` [Bug target/42312] " dj at gcc dot gnu dot org
2009-12-30 16:26 ` manu at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: dcb314 at hotmail dot com @ 2009-12-06 18:58 UTC (permalink / raw)
To: gcc-bugs
I just ran the most excellent tool cppcheck, from sourceforge,
over the gcc source code. It said
config/mep/mep.c:2856: (error) Uninitialized variable: frame_size
I have checked the source code and I agree with cppcheck.
The source code is
int frame_size;
int really_need_stack_frame = frame_size;
which is fine as far as it goes, no problem in copying rubbish
from one place in the stack to another, but the next use of local
variable really_need_stack_frame is
really_need_stack_frame |= mep_assign_save_slots (reg_save_size);
which could lead to problems. Suggest initialise local variable
really_need_stack_frame to something else, perhaps zero would suffice.
--
Summary: config/mep/mep.c:2856: (error) Uninitialized variable:
frame_size
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dcb314 at hotmail dot com
GCC host triplet: x86_64-suse-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42312
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug target/42312] config/mep/mep.c:2856: (error) Uninitialized variable: frame_size
2009-12-06 18:58 [Bug c/42312] New: config/mep/mep.c:2856: (error) Uninitialized variable: frame_size dcb314 at hotmail dot com
@ 2009-12-08 0:48 ` dj at gcc dot gnu dot org
2009-12-30 16:26 ` manu at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: dj at gcc dot gnu dot org @ 2009-12-08 0:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from dj at gcc dot gnu dot org 2009-12-08 00:48 -------
Subject: Bug 42312
Author: dj
Date: Tue Dec 8 00:47:58 2009
New Revision: 155072
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155072
Log:
PR c/42312
* config/mep/mep.c (mep_expand_prologue): Set
really_need_stack_frame after frame_size is set.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/mep/mep.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42312
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug target/42312] config/mep/mep.c:2856: (error) Uninitialized variable: frame_size
2009-12-06 18:58 [Bug c/42312] New: config/mep/mep.c:2856: (error) Uninitialized variable: frame_size dcb314 at hotmail dot com
2009-12-08 0:48 ` [Bug target/42312] " dj at gcc dot gnu dot org
@ 2009-12-30 16:26 ` manu at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: manu at gcc dot gnu dot org @ 2009-12-30 16:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from manu at gcc dot gnu dot org 2009-12-30 16:26 -------
This seems FIXED per DJ's commit.
--
manu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dj at gcc dot gnu dot org,
| |manu at gcc dot gnu dot org
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42312
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-12-30 16:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-06 18:58 [Bug c/42312] New: config/mep/mep.c:2856: (error) Uninitialized variable: frame_size dcb314 at hotmail dot com
2009-12-08 0:48 ` [Bug target/42312] " dj at gcc dot gnu dot org
2009-12-30 16:26 ` manu at gcc dot gnu dot 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).