[Bug bootstrap/70420] New: (Building GCC) mtune=native and internal compiler error at emit-rtl.c:1027
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70420 Bug ID: 70420 Summary: (Building GCC) mtune=native and internal compiler error at emit-rtl.c:1027 Product: gcc Version: 5.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap Assignee: unassigned at gcc dot gnu.org Reporter: xsetech at gmail dot com Target Milestone: --- I'm compiling GCC 5.3.0 for OS X. Specifically compiling it for: OS X El Capitan 10.11.3 Intel(R) Core(TM) i5-4258U CPU @ 2.40GHz The following command-line causes an internal compiler error: CFLAGS_FOR_BUILD="-march=native -mtune=native" CXXFLAGS_FOR_BUILD="-march=native -mtune=native" CFLAGS="-march=native -mtune=native -mfpmath=sse" CPPFLAGS="-march=native -mtune=native -mfpmath=sse" ../configure --prefix=/home/setech/Local/usr/local/ --with-mpc=/home/setech/Local/usr/local/ --with-gmp=/home/setech/Local/usr/local/ --with-mpfr=/home/setech/Local/usr/local/ --with-isl=/home/setech/Local/usr/local/ --enable-languages=c,c++ -v && make -j 3 Without the -mtune and -march options, make completes without verbal error. The exact place of error is: ../../../../libquadmath/math/rem_pio2q.c:587:1: internal compiler error: in gen_reg_rtx, at emit-rtl.c:1027 Some context in the compilation process: xgcc: internal compiler error: Abort trap: 6 (program cc1) Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. make[6]: *** [math/rem_pio2q.lo] Error 1 make[5]: *** [all] Error 2 make[4]: *** [multi-do] Error 1 make[3]: *** [all-multi] Error 2 make[2]: *** [all] Error 2 make[1]: *** [all-target-libquadmath] Error 2 make[1]: *** Waiting for unfinished jobs The host compiler is Xcode's version of GCC (LLVM). `gcc --version` returns: Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 7.0.2 (clang-700.1.81) Target: x86_64-apple-darwin15.3.0 Thread model: posix MPFR: 3.1.4 MPC: 1.0.3 GMP: 6.1.0 ISL: 0.16.1
[Bug bootstrap/70420] (Building GCC) mtune=native and internal compiler error at emit-rtl.c:1027
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70420 --- Comment #2 from Seth Junot --- Created attachment 38124 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38124&action=edit Preprocessed file during libquadmath compilation
[Bug bootstrap/70420] (Building GCC) mtune=native and internal compiler error at emit-rtl.c:1027
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70420 --- Comment #3 from Seth Junot --- The preprocessed *.i file is attached. It was located at [builddir]/x86_64-apple-darwin15.3.0/libquadmath/rem_pio2q.i There was second file at x86_64-apple-darwin15.3.0/i386/libquadmath/rem_pio2q.i From the output (below), we can see that -march and -mtune expand to: -march=haswell -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a -mcx16 -msahf -mmovbe -maes -mno-sha -mpclmul -mpopcnt -mabm -mno-lwp -mfma -mno-fma4 -mno-xop -mbmi -mbmi2 -mno-tbm -mavx -mavx2 -msse4.2 -msse4.1 -mlzcnt -mno-rtm -mno-hle -mrdrnd -mf16c -mfsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-clwb -mno-pcommit -mno-mwaitx --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -mtune=haswell The verbose stdout from the compilation is: ... libtool: compile: /Users/setech/Dev/GNU/GCC/gcc/build_report_gcc/./gcc/xgcc -B/Users/setech/Dev/GNU/GCC/gcc/build_report_gcc/./gcc/ -B/home/setech/Local/usr/local/x86_64-apple-darwin15.3.0/bin/ -B/home/setech/Local/usr/local/x86_64-apple-darwin15.3.0/lib/ -isystem /home/setech/Local/usr/local/x86_64-apple-darwin15.3.0/include -isystem /home/setech/Local/usr/local/x86_64-apple-darwin15.3.0/sys-include -DHAVE_CONFIG_H -I. -I../../../../libquadmath -I ../../../../libquadmath/../include -g -O2 -v -save-temps -march=native -mtune=native -mfpmath=sse -m32 -MT math/rem_pio2q.lo -MD -MP -MF math/.deps/rem_pio2q.Tpo -c ../../../../libquadmath/math/rem_pio2q.c Reading specs from /Users/setech/Dev/GNU/GCC/gcc/build_report_gcc/./gcc/specs COLLECT_GCC=/Users/setech/Dev/GNU/GCC/gcc/build_report_gcc/./gcc/xgcc Target: x86_64-apple-darwin15.3.0 Configured with: ../configure --prefix=/home/setech/Local/usr/local/ --with-mpc=/home/setech/Local/usr/local/ --with-gmp=/home/setech/Local/usr/local/ --with-mpfr=/home/setech/Local/usr/local/ --with-isl=/home/setech/Local/usr/local/ --enable-languages=c,c++ --program-prefix=sj- Thread model: posix gcc version 5.3.0 (GCC) COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.11.3' '-B' '/Users/setech/Dev/GNU/GCC/gcc/build_report_gcc/./gcc/' '-B' '/home/setech/Local/usr/local/x86_64-apple-darwin15.3.0/bin/' '-B' '/home/setech/Local/usr/local/x86_64-apple-darwin15.3.0/lib/' '-isystem' '/home/setech/Local/usr/local/x86_64-apple-darwin15.3.0/include' '-isystem' '/home/setech/Local/usr/local/x86_64-apple-darwin15.3.0/sys-include' '-D' 'HAVE_CONFIG_H' '-I' '.' '-I' '../../../../libquadmath' '-I' '../../../../libquadmath/../include' '-g' '-O2' '-v' '-save-temps' '-march=native' '-mtune=native' '-mfpmath=sse' '-m32' '-MT' 'math/rem_pio2q.lo' '-MD' '-MP' '-MF' 'math/.deps/rem_pio2q.Tpo' '-c' /Users/setech/Dev/GNU/GCC/gcc/build_report_gcc/./gcc/cc1 -E -quiet -v -I . -I ../../../../libquadmath -I ../../../../libquadmath/../include -imultilib i386 -iprefix /Users/setech/Dev/GNU/GCC/gcc-5.3.0/build_report_gcc/gcc/../lib/gcc/x86_64-apple-darwin15.3.0/5.3.0/ -isystem /Users/setech/Dev/GNU/GCC/gcc/build_report_gcc/./gcc/include -isystem /Users/setech/Dev/GNU/GCC/gcc/build_report_gcc/./gcc/include-fixed -MD rem_pio2q.d -MF math/.deps/rem_pio2q.Tpo -MP -MT math/rem_pio2q.lo -D__DYNAMIC__ -D HAVE_CONFIG_H -isystem /home/setech/Local/usr/local/x86_64-apple-darwin15.3.0/include -isystem /home/setech/Local/usr/local/x86_64-apple-darwin15.3.0/sys-include ../../../../libquadmath/math/rem_pio2q.c -march=haswell -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a -mcx16 -msahf -mmovbe -maes -mno-sha -mpclmul -mpopcnt -mabm -mno-lwp -mfma -mno-fma4 -mno-xop -mbmi -mbmi2 -mno-tbm -mavx -mavx2 -msse4.2 -msse4.1 -mlzcnt -mno-rtm -mno-hle -mrdrnd -mf16c -mfsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-clwb -mno-pcommit -mno-mwaitx --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -mtune=haswell -fPIC -feliminate-unused-debug-symbols -mmacosx-version-min=10.11.3 -mfpmath=sse -m32 -g -fworking-directory -O2 -fpch-preprocess -o rem_pio2q.i ignoring nonexistent directory "/home/setech/Local/usr/local/x86_64-apple-darwin15.3.0/include" ignoring nonexistent directory "/home/setech/Local/usr/local/x86_64-apple-darwin15.3.0/sys-include" ignoring nonexistent directory "/Users/setech/Dev/GNU/GCC/gcc-5.3.0/build_report_gcc/gcc/../lib/gcc/x86_64-apple-darwin15.3.0/5.3.0/include" ignoring nonexistent directory "/Users/setech/Dev/GNU/GCC/gcc-5.3.0/build_report_gcc/gcc/../lib/gcc/x86_64-apple-darwin15.3.0/5.3.0/include-fixed" ignoring nonexistent directory "/Users/setech/Dev/GNU/GCC/gcc-5.3.0/build_report_gcc/gcc/../lib/gcc/x86_64-apple-darwin15.3.0/5.3