This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/31048] New: G++ 4.1.1 forgets to allocate memory (skips part of user code)
- From: "satyaakam at yahoo dot co dot in" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Mar 2007 17:15:58 -0000
- Subject: [Bug c++/31048] New: G++ 4.1.1 forgets to allocate memory (skips part of user code)
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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