I am unable to compile this code at -O1 or higher for ppc target. I tested this on my 4.2.4 cross compiler, Denx 4.2.2 cross compiler, and my 4.4.1 cross compiler.
[rozac...@torlxemb1 OM_Playout]$ powerpc-burke-linux-g++ -c -O1 -v test.ii Using built-in specs. Target: powerpc-burke-linux Configured with: /distro/burke/dev/2009.09/oe/build/oetmp/work/i686-ppc440e-sdk-burke-linux/gcc-cross-sdk-4.2.4-r8.2/gcc-4.2.4/configure --build=i686-linux --host=i686-linux --target=powerpc-burke-linux --prefix=/usr/local/burke/powerpc --exec_prefix=/usr/local/burke/powerpc --bindir=/usr/local/burke/powerpc/bin --sbindir=/usr/local/burke/powerpc/bin --libexecdir=/usr/local/burke/powerpc/libexec --datadir=/usr/local/burke/powerpc/share --sysconfdir=/usr/local/burke/powerpc/etc --sharedstatedir=/usr/local/burke/powerpc/share/com --localstatedir=/usr/local/burke/powerpc/var --libdir=/usr/local/burke/powerpc/lib --includedir=/usr/local/burke/powerpc/include --oldincludedir=/usr/local/burke/powerpc/include --infodir=/usr/local/burke/powerpc/share/info --mandir=/usr/local/burke/powerpc/share/man --with-gnu-ld --enable-shared --enable-target-optspace --enable-languages=c,c++,objc --enable-threads=posix --enable-multilib --enable-c99 --enable-long-long --enable-symvers=gnu --enable-libstdcxx-pch --program-prefix=powerpc-burke-linux- --enable-libssp --disable-bootstrap --enable-libgomp --disable-libmudflap --with-sysroot=/usr/local/burke/powerpc/powerpc-burke-linux --with-build-time-tools=/distro/burke/dev/2009.09/oe/build/oetmp/cross/ppc440e/powerpc-burke-linux/bin --with-build-sysroot=/distro/burke/dev/2009.09/oe/build/oetmp/staging/ppc440e-burke-linux --disable-libunwind-exceptions --enable-libssp --enable-libgomp --disable-libmudflap --with-mpfr=/distro/burke/dev/2009.09/oe/build/oetmp/staging/i686-linux/usr --enable-__cxa_atexit Thread model: posix gcc version 4.2.4 /usr/local/burke/powerpc/libexec/gcc/powerpc-burke-linux/4.2.4/cc1plus -fpreprocessed test.ii -quiet -dumpbase test.ii -auxbase test -O1 -version -o /tmp/ccyqwRie.s GNU C++ version 4.2.4 (powerpc-burke-linux) compiled by GNU C version 4.3.0 20080428 (Red Hat 4.3.0-8). GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: 305b4088bdd69deb7ce8a8fa07df1676 test.ii: In member function CCarousel* CPlayout::_ZTch0_h4_N8CPlayout14CreateCarouselEP14CCarouselOwner14CRemapPidIndex(CCarouselOwner*, CRemapPidIndex): test.ii:50: internal compiler error: in expand_expr_addr_expr_1, at expr.c:6577 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions -- Summary: internal compiler error Product: gcc Version: 4.2.4 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rozachar at cisco dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43313