This fails with svn and all recent versions of gcc. Compile succeeds for either -O2 or -fPIC but not both.
Using built-in specs. COLLECT_GCC=mn10300-linux-gcc COLLECT_LTO_WRAPPER=/home/memmel/Source/GCC/install/libexec/gcc/am33_2.0-linux-gnu/4.6.0/lto-wrapper Target: am33_2.0-linux-gnu Configured with: /home/memmel/Source/GCC/source/gcc-svn/configure --prefix=/home/memmel/Source/GCC/install --enable-languages=c,c++ --target=am33_2.0-linux-gnu --disable-shared --enable-long-long --enable-threads=posix --enable-__cxa_atexit --enable-c99 --with-tls --with-__thread --program-transform-name='s/^/mn10300-linux-/' --with-headers=/home/memmel/Source/root/usr/include --with-sysroot=/home/memmel/Source/root/root Thread model: posix gcc version 4.6.0 20100602 (experimental) (GCC) COLLECT_GCC_OPTIONS='-v' '-save-temps' '-O2' '-fPIC' '-c' /home/memmel/Source/GCC/install/libexec/gcc/am33_2.0-linux-gnu/4.6.0/cc1 -E -quiet -v -D__AM33__=2 -D__AM33_2__ Fail.c -fPIC -O2 -fpch-preprocess -o Fail.i #include "..." search starts here: #include <...> search starts here: /home/memmel/Source/root/usr/local/include /home/memmel/Source/GCC/install/lib/gcc/am33_2.0-linux-gnu/4.6.0/include /home/memmel/Source/GCC/install/lib/gcc/am33_2.0-linux-gnu/4.6.0/include-fixed /home/memmel/Source/GCC/install/lib/gcc/am33_2.0-linux-gnu/4.6.0/../../../../am33_2.0-linux-gnu/include /home/memmel/Source/root/root/usr/include End of search list. COLLECT_GCC_OPTIONS='-v' '-save-temps' '-O2' '-fPIC' '-c' /home/memmel/Source/GCC/install/libexec/gcc/am33_2.0-linux-gnu/4.6.0/cc1 -fpreprocessed Fail.i -quiet -dumpbase Fail.c -auxbase Fail -O2 -version -fPIC -o Fail.s GNU C (GCC) version 4.6.0 20100602 (experimental) (am33_2.0-linux-gnu) compiled by GNU C version 4.4.1, GMP version 4.2.4, MPFR version 2.4.1, MPC version 0.8 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 GNU C (GCC) version 4.6.0 20100602 (experimental) (am33_2.0-linux-gnu) compiled by GNU C version 4.4.1, GMP version 4.2.4, MPFR version 2.4.1, MPC version 0.8 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 Compiler executable checksum: 9cbf051770868bb4cd9a3fde906e4e86 Fail.c: In function âdoSetDoubleâ: Fail.c:7:1: internal compiler error: in change_address_1, at emit-rtl.c:1940 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. -- Summary: mn10300 fails with -02 and -fPIC Product: gcc Version: unknown Status: UNCONFIRMED Severity: critical Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: mike dot emmel at gmail dot com GCC build triplet: i486-linux-gnu GCC host triplet: i486-linux-gnu GCC target triplet: am33_2.0-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44394