https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97939
Dennis Clarke <dclarke at blastwave dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dclarke at blastwave dot org --- Comment #4 from Dennis Clarke <dclarke at blastwave dot org> --- Merely a little followup here. I did see that a unit test in the new libgmp was failing in strange ways on sparc64 and thus I did a round of tests with the previous libgmp and with two versions of gcc on Debisn sid. In all cases the libgmp test failed but only on one platform. https://gmplib.org/list-archives/gmp-bugs/2020-November/004962.html The idea on the table is that we have a compiler fault here and then Vincent Lefèvre seems to have isolated the code test down to a trivial test case. To add on here I see the same sort of behavior with gcc 8.1.0 on a Solaris sparcv9 server : isc $ isc $ uname -a SunOS isc 5.10 Generic_150400-44 sun4u sparc SUNW,UltraAX-i2 isc $ /usr/local/gcc8/bin/gcc --version gcc (genunix Fri May 11 08:23:40 GMT 2018) 8.1.0 Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. isc $ $CC -fsanitize=undefined -v -c tst.c Using built-in specs. COLLECT_GCC=/usr/local/gcc8/bin/gcc Target: sparc64-sun-solaris2.10 Configured with: ../gcc-8.1.0/configure --prefix=/usr/local/gcc8 --build=sparc64-sun-solaris2.10 --target=sparc64-sun-solaris2.10 --host=sparc64-sun-solaris2.10 --without-gnu-as --without-gnu-ld --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/sparcv9/ld --disable-nls --enable-threads=posix --enable-shared --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local --with-isl=/usr/local --with-build-time-tools=/usr/local/bin --with-cpu=v9 --enable-bootstrap --enable-stage1-languages=c,c++ --enable-stage1-checking=misc --enable-languages=ada,c,c++,fortran,go,lto,objc,obj-c++ --with-pkgversion='genunix Fri May 11 08:23:40 GMT 2018' Thread model: posix gcc version 8.1.0 (genunix Fri May 11 08:23:40 GMT 2018) COLLECT_GCC_OPTIONS='-fsanitize=undefined' '-v' '-c' '-mcpu=v9' /usr/local/gcc8/libexec/gcc/sparc64-sun-solaris2.10/8.1.0/cc1 -quiet -v -D__arch64__ -D__sparcv9 tst.c -quiet -dumpbase tst.c -mcpu=v9 -auxbase tst -version -fsanitize=undefined -o /var/tmp//ccI8b25O.s GNU C17 (genunix Fri May 11 08:23:40 GMT 2018) version 8.1.0 (sparc64-sun-solaris2.10) compiled by GNU C version 8.1.0, GMP version 6.1.2, MPFR version 4.0.1-p6, MPC version 1.1.0, isl version isl-0.19-GMP warning: MPFR header version 4.0.1-p6 differs from library version 4.0.1. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 ignoring nonexistent directory "/usr/local/gcc8/lib/gcc/sparc64-sun-solaris2.10/8.1.0/../../../../sparc64-sun-solaris2.10/include" #include "..." search starts here: #include <...> search starts here: /usr/local/gcc8/lib/gcc/sparc64-sun-solaris2.10/8.1.0/include /usr/local/include /usr/local/gcc8/include /usr/local/gcc8/lib/gcc/sparc64-sun-solaris2.10/8.1.0/include-fixed /usr/include End of search list. GNU C17 (genunix Fri May 11 08:23:40 GMT 2018) version 8.1.0 (sparc64-sun-solaris2.10) compiled by GNU C version 8.1.0, GMP version 6.1.2, MPFR version 4.0.1-p6, MPC version 1.1.0, isl version isl-0.19-GMP warning: MPFR header version 4.0.1-p6 differs from library version 4.0.1. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: 56c9e74e9d01ca812c9fcd9ec58a5d7d tst.c: In function 'f': tst.c:5:1: error: unrecognizable insn: } ^ (insn 7 6 8 2 (parallel [ (set (reg:CCXV 100 %icc) (compare:CCXV (plus:DI (reg:DI 112) (const_int 4096 [0x1000])) (unspec:DI [ (reg:DI 112) (const_int 4096 [0x1000]) ] UNSPEC_ADDV))) (set (reg:DI 111) (plus:DI (reg:DI 112) (const_int 4096 [0x1000]))) ]) "tst.c":4 -1 (nil)) during RTL pass: vregs tst.c:5:1: internal compiler error: in extract_insn, at recog.c:2304 0x100daff3b _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) ../../gcc-8.1.0/gcc/rtl-error.c:108 0x100daff73 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*) ../../gcc-8.1.0/gcc/rtl-error.c:116 0x1005e15eb extract_insn(rtx_insn*) ../../gcc-8.1.0/gcc/recog.c:2304 0x1003c0a57 instantiate_virtual_regs_in_insn ../../gcc-8.1.0/gcc/function.c:1648 0x1003c0a57 instantiate_virtual_regs ../../gcc-8.1.0/gcc/function.c:1969 0x1003c0a57 execute ../../gcc-8.1.0/gcc/function.c:2018 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. isc $ I will try this same test on Debian sid with both the previous release gcc 9.3.0 ( Debian 9.3.0-18 ) and also the with the latest gcc 10.2.0 (Debian 10.2.0-17) wherein I expect to see similar results : ceres$ ceres$ /usr/bin/gcc-9 -v -fsanitize=undefined -v -c tst.c Using built-in specs. COLLECT_GCC=/usr/bin/gcc-9 Target: sparc64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 9.3.0-18' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=sparc64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --disable-libphobos --enable-objc-gc=auto --enable-multiarch --disable-werror --with-cpu-32=ultrasparc --enable-targets=all --with-long-double-128 --enable-multilib --enable-checking=release --build=sparc64-linux-gnu --host=sparc64-linux-gnu --target=sparc64-linux-gnu Thread model: posix gcc version 9.3.0 (Debian 9.3.0-18) COLLECT_GCC_OPTIONS='-v' '-fsanitize=undefined' '-v' '-c' '-mcpu=v9' /usr/lib/gcc/sparc64-linux-gnu/9/cc1 -quiet -v -v -imultiarch sparc64-linux-gnu -D__sparc_v9__ -D__arch64__ tst.c -quiet -dumpbase tst.c -mcpu=v9 -auxbase tst -version -fsanitize=undefined -o /var/tmp/dclarke/ccE9gIDO.s GNU C17 (Debian 9.3.0-18) version 9.3.0 (sparc64-linux-gnu) compiled by GNU C version 9.3.0, GMP version 6.2.0, MPFR version 4.1.0, MPC version 1.2.0, isl version isl-0.22.1-GMP warning: GMP header version 6.2.0 differs from library version 6.2.1. GGC heuristics: --param ggc-min-expand=97 --param ggc-min-heapsize=127207 ignoring nonexistent directory "/usr/local/include/sparc64-linux-gnu" ignoring nonexistent directory "/usr/lib/gcc/sparc64-linux-gnu/9/include-fixed" ignoring nonexistent directory "/usr/lib/gcc/sparc64-linux-gnu/9/../../../../sparc64-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /usr/lib/gcc/sparc64-linux-gnu/9/include /usr/local/include /usr/include/sparc64-linux-gnu /usr/include End of search list. GNU C17 (Debian 9.3.0-18) version 9.3.0 (sparc64-linux-gnu) compiled by GNU C version 9.3.0, GMP version 6.2.0, MPFR version 4.1.0, MPC version 1.2.0, isl version isl-0.22.1-GMP warning: GMP header version 6.2.0 differs from library version 6.2.1. GGC heuristics: --param ggc-min-expand=97 --param ggc-min-heapsize=127207 Compiler executable checksum: d73310b8041d45fee0423dc805f5c657 tst.c: In function ‘f’: tst.c:5:1: error: unrecognizable insn: 5 | } | ^ (insn 7 6 8 2 (parallel [ (set (reg:CCXV 100 %icc) (compare:CCXV (plus:DI (reg:DI 113) (const_int 4096 [0x1000])) (unspec:DI [ (reg:DI 113) (const_int 4096 [0x1000]) ] UNSPEC_ADDV))) (set (reg:DI 112) (plus:DI (reg:DI 113) (const_int 4096 [0x1000]))) ]) "tst.c":4:12 -1 (nil)) during RTL pass: vregs tst.c:5:1: internal compiler error: in extract_insn, at recog.c:2310 0xfffff80100bf2803 __libc_start_main ./csu/libc-start.c:308 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <file:///usr/share/doc/gcc-9/README.Bugs> for instructions. ceres$ ceres$ ceres$ /usr/bin/gcc-10 -v -fsanitize=undefined -v -c tst.c Using built-in specs. COLLECT_GCC=/usr/bin/gcc-10 Target: sparc64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 10.2.0-17' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-10 --program-prefix=sparc64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --disable-libphobos --enable-objc-gc=auto --enable-multiarch --disable-werror --with-cpu-32=ultrasparc --enable-targets=all --with-long-double-128 --enable-multilib --enable-checking=release --build=sparc64-linux-gnu --host=sparc64-linux-gnu --target=sparc64-linux-gnu Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 10.2.0 (Debian 10.2.0-17) COLLECT_GCC_OPTIONS='-v' '-fsanitize=undefined' '-v' '-c' '-mcpu=v9' /usr/lib/gcc/sparc64-linux-gnu/10/cc1 -quiet -v -v -imultiarch sparc64-linux-gnu -D__sparc_v9__ -D__arch64__ tst.c -quiet -dumpbase tst.c -mcpu=v9 -auxbase tst -version -fsanitize=undefined -o /var/tmp/dclarke/ccy8GBEV.s GNU C17 (Debian 10.2.0-17) version 10.2.0 (sparc64-linux-gnu) compiled by GNU C version 10.2.0, GMP version 6.2.0, MPFR version 4.1.0, MPC version 1.2.0, isl version isl-0.22.1-GMP warning: GMP header version 6.2.0 differs from library version 6.2.1. GGC heuristics: --param ggc-min-expand=97 --param ggc-min-heapsize=127207 ignoring nonexistent directory "/usr/local/include/sparc64-linux-gnu" ignoring nonexistent directory "/usr/lib/gcc/sparc64-linux-gnu/10/include-fixed" ignoring nonexistent directory "/usr/lib/gcc/sparc64-linux-gnu/10/../../../../sparc64-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /usr/lib/gcc/sparc64-linux-gnu/10/include /usr/local/include /usr/include/sparc64-linux-gnu /usr/include End of search list. GNU C17 (Debian 10.2.0-17) version 10.2.0 (sparc64-linux-gnu) compiled by GNU C version 10.2.0, GMP version 6.2.0, MPFR version 4.1.0, MPC version 1.2.0, isl version isl-0.22.1-GMP warning: GMP header version 6.2.0 differs from library version 6.2.1. GGC heuristics: --param ggc-min-expand=97 --param ggc-min-heapsize=127207 Compiler executable checksum: 90178539ba1dc1edb30cf829faab698d tst.c: In function ‘f’: tst.c:5:1: error: unrecognizable insn: 5 | } | ^ (insn 7 6 8 2 (parallel [ (set (reg:CCXV 100 %icc) (compare:CCXV (plus:DI (reg:DI 113) (const_int 4096 [0x1000])) (unspec:DI [ (reg:DI 113) (const_int 4096 [0x1000]) ] UNSPEC_ADDV))) (set (reg:DI 112) (plus:DI (reg:DI 113) (const_int 4096 [0x1000]))) ]) "tst.c":4:12 -1 (nil)) during RTL pass: vregs tst.c:5:1: internal compiler error: in extract_insn, at recog.c:2294 0xfffff80100dee803 __libc_start_main ./csu/libc-start.c:308 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <file:///usr/share/doc/gcc-10/README.Bugs> for instructions. ceres$ So it looks like this bug has been around for years and strangely I didn't see it back in 2018 on Solaris sparcv9. That is odd. -- Dennis Clarke RISC-V/SPARC/PPC/ARM/CISC UNIX and Linux spoken GreyBeard and suspenders optional