I just tried to compile the attached C++ source code with both
gcc 4.3.1 and gcc 4.4.0 snapshot 20081031.

gcc 431 took less than one second and consumed a trivial amount
of virtual memory.

gcc 440 snapshot 20081031 took over 90 seconds on an idle machine,
and consumed over 11 Gig of virtual memory before running out of
virtual memory.

In my opinion, 11 Gig of memory is an excessive amount of memory to use.
I suspect the compiler is looping without doing any productive work.

Preprocessed source code attached. Flag -O2 required.


-- 
           Summary: excessive memory consumption - possible hang
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dcb314 at hotmail dot com
  GCC host triplet: suse-linux-x86_64


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

Reply via email to