[Bug c++/31049] New: G++ 4.1.1 forgets to allocate memory (skips part of user code)

satyaakam at yahoo dot co dot in gcc-bugzilla@gcc.gnu.org
Mon Mar 5 17:16:00 GMT 2007


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 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=31049



More information about the Gcc-bugs mailing list