This is the mail archive of the 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++/29330] New: -O -ftree-loop-linear --> virtual memory exhausted

> g++ -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../configure -v --enable-languages=c,c++
--prefix=/home/wouter/gcc/local --enable-shared --with-system-zlib --enable-nls
--enable-threads=posix --without-included-gettext --disable-werror
--enable-__cxa_atexit --enable-libstdcxx-allocator=mt --enable-clocale=gnu
--enable-libstdcxx-debug i486-linux-gnu --enable-libmudflap
Thread model: posix
gcc version 4.2.0 20061003 (experimental)

> g++ -O -ftree-loop-linear foo.cpp
virtual memory exhausted: Cannot allocate memory

> cat foo.cpp
int buf[2][2][2][2];

void f()
    for (int a = 0; a < 2; ++a) {
        for (int b = 0; b < 2; ++b) {
            for (int c = 0; c < 2; ++c) {
                for (int d = 0; d < 2; ++d) {
                    buf[a][b][c][d] = 0;

           Summary:  -O -ftree-loop-linear   -->  virtual memory exhausted
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: wouter dot vermaelen at pi dot be

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