This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/44851] New: questionable "'<anonymous>' may be used uninitialized" warning and code failure


The attached simple test case crashes when compiled with g++ but not with gcc.
Version 4.4.3 of g++ emits the "'<anonymous>' may be used uninitialized"
warning.

The program works fine when one unreachable line is removed from the program.
It seems that the compiler generates incorrect code when the unreachable line
is present.  The program also works if optimization is enabled, presumably
because it optimizes away the unreachable line.

g++ -Wall -g -o gccmultidimarray gccmultidimarray.c


-- 
           Summary: questionable "'<anonymous>' may be used uninitialized"
                    warning and code failure
           Product: gcc
           Version: 4.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bgreen at nas dot nasa dot gov
GCC target triplet: x86_64-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44851


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]