gcc running out of memory on ARMAsmParser.cpp

Hi,

I tried to compile LLVM on an Amazon EC2 Linux instance that doesn't
have a ton of memory (~600 MB). It keeps failing with:

   llvm[4]: Compiling ARMAsmParser.cpp for Release build
   g++: Internal error: Killed (program cc1plus)

It's getting killed for using all the system memory. Is this file
known to trigger any bugs in gcc? (version 4.1.2)

Here is /var/log/messages:
Feb 28 13:33:54 ip-10-195-190-127 klogd: [232896.775450] Out of
memory: kill process 6740 (cc1plus) score 165582 or a child
Feb 28 13:33:54 ip-10-195-190-127 klogd: [232896.775458] Killed
process 6740 (cc1plus) vsz:662328kB, anon-rss:554632kB, file-rss:104kB

thanks,
Rob

Hi Rob,

I tried to compile LLVM on an Amazon EC2 Linux instance that doesn't
have a ton of memory (~600 MB). It keeps failing with:

    llvm[4]: Compiling ARMAsmParser.cpp for Release build
    g++: Internal error: Killed (program cc1plus)

It's getting killed for using all the system memory. Is this file
known to trigger any bugs in gcc? (version 4.1.2)

try compiling without optimization (configure with --disable-optimized).
While gcc-4.1.x has been known to miscompile LLVM, I never heard of it
going into an infinite loop during the LLVM compile, so presumably it
would finish eventually if you had enough memory.

Ciao, Duncan.