I'm cross compiling for an embedded PowerPC/Altivec processor on an i386
solaris box. When cpp is invoked on the file attached to this report, the
system thrashes the disk for few minutes, then runs out of memory. I tried
increasing swap space, but the preprocessor really shouldn't need about 3 GB
to compile this program. I've included the recommended invocation of gcc
with -v -save-temps, but the same thing happens with powerpc-unknown-
eabialtivec-cpp without the -v and -save-temps flags.
--------------------------------------------------
$ powerpc-unknown-eabialtivec-gcc -v -save-temps -std=gnu9x -
isystem /tool/gcc/4.0.1/i386-pc-solaris2.10-ppc-eabi/powerpc-unknown-
eabialtivec/include -o results.txt testit.c
Using built-in specs.
Target: powerpc-unknown-eabialtivec
Configured with: /tool/gcc/4.0.1/gcc-4.0.1/configure --
prefix=/tool/gcc/4.0.1/i386-pc-solaris2.10-ppc-eabi --target=powerpc-unknown-
eabialtivec --with-cpu=7450 --with-float=hard --with-
sysroot=/tool/gcc/4.0.1/newlib-1.13.0 --enable-altivec --with-dwarf2
Thread model: single
gcc version 4.0.1
/tool/gcc/4.0.1/i386-pc-solaris2.10-ppc-eabi/libexec/gcc/powerpc-unknown-
eabialtivec/4.0.1/cc1 -E -quiet -v -isystem /tool/gcc/4.0.1/i386-pc-
solaris2.10-ppc-eabi/powerpc-unknown-eabialtivec/include testit.c -mcpu=7450 -
mhard-float -std=gnu9x -fpch-preprocess -o testit.i
ignoring nonexistent directory "/tool/gcc/4.0.1/newlib-
1.13.0/usr/local/include"
ignoring duplicate directory "/tool/gcc/4.0.1/i386-pc-solaris2.10-ppc-
eabi/lib/gcc/powerpc-unknown-eabialtivec/4.0.1/../../../../powerpc-unknown-
eabialtivec/include"
#include "..." search starts here:
#include <...> search starts here:
/tool/gcc/4.0.1/i386-pc-solaris2.10-ppc-eabi/powerpc-unknown-
eabialtivec/include
/tool/gcc/4.0.1/i386-pc-solaris2.10-ppc-eabi/lib/gcc/powerpc-unknown-
eabialtivec/4.0.1/include
/tool/gcc/4.0.1/newlib-1.13.0/usr/include
End of search list.
cc1: out of memory allocating 987240500 bytes after a total of 1921990656 bytes
$
-----------------------------------------------------
The program includes <altivec.h> You'll have to change the -isystem flag to
point to your system include files.
This code works fine with CodeWarrior, though CW obviously doesn't include
<altivec.h>.
Most of the test file is a macro. This macro is used to supply an optimized
implementation for one of the many sub-cases of bitblt or rasterOp. There are
several such macros. Macros are used to avoid duplicating the same code for
each of the flavors of bitblt.
--
Summary: powerpc-unknown-eabialtivec-cpp runs out of memory
Product: gcc
Version: 4.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: preprocessor
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: Daniel dot Davies at xerox dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i386-pc-solaris2.10
GCC host triplet: i386-pc-solaris2.10
GCC target triplet: powerpc-unknown-eabialtivec
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23759