http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57844
Bug ID: 57844 Summary: avr-unknown-elf libstdc++v3 build causes internal compiler error: in extract_insn, at recog.c:2150 Product: gcc Version: 4.8.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: bugzilla.gcc at buszta dot info Trying to compile GCC 4.8.1 (SVN trunk also applies) toolchain for avr-unknown-elf target with standard C++ library support. Configuration options: ../gcc-4.8.1/configure --prefix=/home/abuszta/Development/avr/gcc-4.8.1-avr-unknown-elf --target=avr-unknown-elf --disable-__cxa_atexit --disable-nls --disable-threads --disable-shared --enable-static --with-dwarf2 --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local --with-ppl=/usr/local --enable-libstdcxx --enable-languages=c,c++ --with-newlib --disable-sjlj-exceptions Build with: binutils 2.23.2 gmp 5.0.5 mpc 0.9 mpfr 3.1.2 ppl 0.12.1 newlib 1.20.0 Host GCC: gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.7.2/lto-wrapper Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --disable-build-with-cxx --disable-build-poststage1-with-cxx --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux Thread model: posix gcc version 4.7.2 20120921 (Red Hat 4.7.2-2) (GCC) Building make all-target-libstdc++-v3 gives error: (...) Making all in c++11 make[8]: Entering directory `/home/abuszta/Development/avr/gcc-4.8.1-build/avr-unknown-elf/tiny-stack/libstdc++-v3/src/c++11' /bin/sh ../../libtool --tag CXX --tag disable-shared --mode=compile /home/abuszta/Development/avr/gcc-4.8.1-build/./gcc/xgcc -shared-libgcc -B/home/abuszta/Development/avr/gcc-4.8.1-build/./gcc -nostdinc++ -L/home/abuszta/Development/avr/gcc-4.8.1-build/avr-unknown-elf/tiny-stack/libstdc++-v3/src -L/home/abuszta/Development/avr/gcc-4.8.1-build/avr-unknown-elf/tiny-stack/libstdc++-v3/src/.libs -B/home/abuszta/Development/avr/gcc-4.8.1-avr-unknown-elf/avr-unknown-elf/bin/ -B/home/abuszta/Development/avr/gcc-4.8.1-avr-unknown-elf/avr-unknown-elf/lib/ -isystem /home/abuszta/Development/avr/gcc-4.8.1-avr-unknown-elf/avr-unknown-elf/include -isystem /home/abuszta/Development/avr/gcc-4.8.1-avr-unknown-elf/avr-unknown-elf/sys-include -msp8 -I/home/abuszta/Development/avr/gcc-4.8.1/libstdc++-v3/../libgcc -I/home/abuszta/Development/avr/gcc-4.8.1-build/avr-unknown-elf/tiny-stack/libstdc++-v3/include/avr-unknown-elf -I/home/abuszta/Development/avr/gcc-4.8.1-build/avr-unknown-elf/tiny-stack/libstdc++-v3/include -I/home/abuszta/Development/avr/gcc-4.8.1/libstdc++-v3/libsupc++ -std=gnu++11 -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=debug.lo -g -O2 -msp8 -c -o debug.lo ../../../../../../gcc-4.8.1/libstdc++-v3/src/c++11/debug.cc libtool: compile: /home/abuszta/Development/avr/gcc-4.8.1-build/./gcc/xgcc -shared-libgcc -B/home/abuszta/Development/avr/gcc-4.8.1-build/./gcc -nostdinc++ -L/home/abuszta/Development/avr/gcc-4.8.1-build/avr-unknown-elf/tiny-stack/libstdc++-v3/src -L/home/abuszta/Development/avr/gcc-4.8.1-build/avr-unknown-elf/tiny-stack/libstdc++-v3/src/.libs -B/home/abuszta/Development/avr/gcc-4.8.1-avr-unknown-elf/avr-unknown-elf/bin/ -B/home/abuszta/Development/avr/gcc-4.8.1-avr-unknown-elf/avr-unknown-elf/lib/ -isystem /home/abuszta/Development/avr/gcc-4.8.1-avr-unknown-elf/avr-unknown-elf/include -isystem /home/abuszta/Development/avr/gcc-4.8.1-avr-unknown-elf/avr-unknown-elf/sys-include -msp8 -I/home/abuszta/Development/avr/gcc-4.8.1/libstdc++-v3/../libgcc -I/home/abuszta/Development/avr/gcc-4.8.1-build/avr-unknown-elf/tiny-stack/libstdc++-v3/include/avr-unknown-elf -I/home/abuszta/Development/avr/gcc-4.8.1-build/avr-unknown-elf/tiny-stack/libstdc++-v3/include -I/home/abuszta/Development/avr/gcc-4.8.1/libstdc++-v3/libsupc++ -std=gnu++11 -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=debug.lo -g -O2 -msp8 -c ../../../../../../gcc-4.8.1/libstdc++-v3/src/c++11/debug.cc -o debug.o ../../../../../../gcc-4.8.1/libstdc++-v3/src/c++11/debug.cc: In member function 'void __gnu_debug::_Error_formatter::_Parameter::_M_print_description(const __gnu_debug::_Error_formatter*) const': ../../../../../../gcc-4.8.1/libstdc++-v3/src/c++11/debug.cc:725:3: error: unrecognizable insn: } ^ (insn/f 287 286 288 2 (set (reg:QI 28 r28) (plus:QI (reg:QI 28 r28) (const_int 128 [0x80]))) ../../../../../../gcc-4.8.1/libstdc++-v3/src/c++11/debug.cc:649 -1 (expr_list:REG_CFA_ADJUST_CFA (set (reg/f:HI 28 r28) (plus:HI (reg/f:HI 28 r28) (const_int -128 [0xffffffffffffff80]))) (nil))) ../../../../../../gcc-4.8.1/libstdc++-v3/src/c++11/debug.cc:725:3: internal compiler error: in extract_insn, at recog.c:2150 0x82e765 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) ../../gcc-4.8.1/gcc/rtl-error.c:109 0x82e799 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*) ../../gcc-4.8.1/gcc/rtl-error.c:117 0x805760 extract_insn(rtx_def*) ../../gcc-4.8.1/gcc/recog.c:2150 0x8092cb copyprop_hardreg_forward_1 ../../gcc-4.8.1/gcc/regcprop.c:772 0x8092cb copyprop_hardreg_forward ../../gcc-4.8.1/gcc/regcprop.c:1092 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions. make[8]: *** [debug.lo] Error 1 make[8]: Leaving directory `/home/abuszta/Development/avr/gcc-4.8.1-build/avr-unknown-elf/tiny-stack/libstdc++-v3/src/c++11' (...) Without --enable-libstdcxx configuration says that "This configuration is not supported in the following subdirectories: (...) target-libstdc++-v3". --enable-libstdcxx allows all-target-libstdc++-v3 to start building. In my opinion, either --enable-libstdcxx option should not force building libstdc++v3 for this target arch (e.g. say like libatomic: "configure: error: Configuration avr-unknown-elf is unsupported"), or building libstdc++v3 should work.