http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58537
Bug ID: 58537 Summary: internal compiler error: in gen_rtx_SUBREG, at emit-rtl.c:776 Product: gcc Version: 4.8.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: cas43 at cs dot stanford.edu Created attachment 30898 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30898&action=edit Program that triggers ICE When compiling the attached program like this (all options except -c are required): g++ -c -march=nocona -O2 -funroll-loops -fno-signed-zeros -gdwarf-2 prog.cpp I get this result prog.cpp: In member function ‘SYMMETRIC_MATRIX<float> TORUS<T>::Hessian(const TV&) const [with T = float; TORUS<T>::TV = VECTOR<float>]’: prog.cpp:102:1: internal compiler error: in gen_rtx_SUBREG, at emit-rtl.c:776 } ^ 0x6d5fbb gen_rtx_SUBREG(machine_mode, rtx_def*, int) ../../s-4.8/gcc/emit-rtl.c:776 0xa15d2c dead_debug_insert_temp(dead_debug_local*, unsigned int, rtx_def*, debug_temp_where) ../../s-4.8/gcc/valtrack.c:731 0xc04e9f dce_process_block ../../s-4.8/gcc/dce.c:995 0xc04e9f fast_dce ../../s-4.8/gcc/dce.c:1068 0xc05544 rest_of_handle_fast_dce ../../s-4.8/gcc/dce.c:1132 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. compiler version: Using built-in specs. COLLECT_GCC=/home/craig/new-gcc/i-4.8/bin/g++ COLLECT_LTO_WRAPPER=/home/craig/new-gcc/i-4.8/libexec/gcc/x86_64-unknown-linux-gnu/4.8.2/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../s-4.8/configure --prefix=/home/craig/new-gcc/i-4.8 Thread model: posix gcc version 4.8.2 20130925 (prerelease) (GCC) I get similar results with this version: Using built-in specs. COLLECT_GCC=/home/craig/new-gcc/i-trunk/bin/g++ COLLECT_LTO_WRAPPER=/home/craig/new-gcc/i-trunk/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../s-trunk/configure --prefix=/home/craig/new-gcc/i-trunk Thread model: posix gcc version 4.9.0 20130730 (experimental) (GCC) The program compiles cleanly with this version (even with -Wall): Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) And it also builds cleanly with a fairly recent build of clang: clang version 3.4 (trunk 187482) Target: x86_64-unknown-linux-gnu Thread model: posix