From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1730 invoked by alias); 5 Mar 2007 17:16:07 -0000 Received: (qmail 1698 invoked by uid 48); 5 Mar 2007 17:15:58 -0000 Date: Mon, 05 Mar 2007 17:16:00 -0000 Subject: [Bug c++/31048] New: G++ 4.1.1 forgets to allocate memory (skips part of user code) X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "satyaakam at yahoo dot co dot in" 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: 2007-03/txt/msg00326.txt.bz2 Hi, We have problems using gcc 4.1.1. we are trying to compile a code in file case17.cpp (see attached in testcase area). The problem is that compiler forgets to call malloc and forgets to check the return value (see case17.s) and it also forgets to initialize pointer called color. That is we do not see the following lines reflected in the assembly output: char **const colorTable = (char **)std::malloc(ncolors*sizeof*colorTable), **volatile color=colorTable; if(colorTable); else { return *oldct = 0; } -- Summary: G++ 4.1.1 forgets to allocate memory (skips part of user code) Product: gcc Version: 4.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: satyaakam at yahoo dot co dot in http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31048