From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8714 invoked by alias); 6 Dec 2009 18:58:35 -0000 Received: (qmail 8655 invoked by uid 48); 6 Dec 2009 18:58:21 -0000 Date: Sun, 06 Dec 2009 18:58:00 -0000 Subject: [Bug c/42312] New: config/mep/mep.c:2856: (error) Uninitialized variable: frame_size X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "dcb314 at hotmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-12/txt/msg00622.txt.bz2 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