Created attachment 592676 [details] build.log sparc-unknown-linux-gnu-gcc -pthread -c -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -mcpu=niagara2 -pipe -fwrapv -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wno-cast-function-type -I. -I./Include -fPIC -DPy_BUILD_CORE -o Python/dtoa.o Python/dtoa.c during RTL pass: reload Python/dtoa.c: In function '_Py_dg_infinity': Python/dtoa.c:1431:1: internal compiler error: Segmentation fault } ^ Portage 2.3.76 (python 3.6.5-final-0, default/linux/sparc/17.0, gcc-8.3.0, glibc-2.29-r2, 5.3.0 sparc64) ================================================================= System Settings ================================================================= System uname: Linux-5.3.0-sparc64-sun4v-with-gentoo-2.4.1 KiB Mem: 33080320 total, 8198744 free KiB Swap: 0 total, 0 free Timestamp of repository gentoo: Mon, 14 Oct 2019 00:15:01 +0000 Head commit of repository gentoo: bde0ef6d982dd6b7c0c577b4a69f283cb45e7978 sh bash 4.4_p23-r1 ld GNU ld (Gentoo 2.32 p2) 2.32.0 app-shells/bash: 4.4_p23-r1::gentoo dev-lang/perl: 5.28.2-r1::gentoo dev-lang/python: 2.7.16::gentoo, 3.6.5::gentoo dev-util/cmake: 3.15.2::gentoo sys-apps/baselayout: 2.4.1-r2::gentoo sys-apps/openrc: 0.41.2::gentoo sys-apps/sandbox: 2.13::gentoo sys-devel/autoconf: 2.69-r4::gentoo sys-devel/automake: 1.16.1-r1::gentoo sys-devel/binutils: 2.32-r1::gentoo sys-devel/gcc: 3.4.6-r2::gentoo, 4.1.2::gentoo, 4.2.4-r1::gentoo, 4.3.6-r1::gentoo, 4.4.7::gentoo, 4.5.4::gentoo, 4.6.4::gentoo, 4.7.4::gentoo, 4.8.5::gentoo, 4.9.4::gentoo, 5.4.0-r6::gentoo, 6.5.0-r1::gentoo, 7.4.0-r2::gentoo, 8.3.0-r2::gentoo, 9.2.0-r1::gentoo sys-devel/gcc-config: 2.0::gentoo sys-devel/libtool: 2.4.6-r3::gentoo sys-devel/make: 4.2.1-r4::gentoo sys-kernel/linux-headers: 4.19::gentoo (virtual/os-headers) sys-libs/glibc: 2.29-r2::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.de.gentoo.org/gentoo-portage/ priority: -1000 sync-rsync-extra-opts: sync-rsync-verify-metamanifest: yes sync-rsync-verify-jobs: 1 sync-rsync-verify-max-age: 24 dakon location: /var/lib/layman/dakon masters: gentoo priority: 50 local location: /usr/local/portage masters: gentoo priority: 100 ACCEPT_KEYWORDS="sparc" ACCEPT_LICENSE="@FREE public-domain/GPL" CBUILD="sparc-unknown-linux-gnu" CFLAGS="-O2 -mcpu=niagara2 -pipe" CHOST="sparc-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/qmail/alias /var/qmail/control" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.3/ext-active/ /etc/php/cgi-php7.3/ext-active/ /etc/php/cli-php7.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -mcpu=niagara2 -pipe" DISTDIR="/usr/portage/distfiles" ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="" GENTOO_MIRRORS="ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en de" MAKEOPTS="-j20" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" USE="acl big-endian bzip2 cli crypt curl cxx dri fortran gdbm iconv ipv6 libtirpc ncurses nptl openmp pam pcre readline sparc split-usr ssl tcpd unicode xattr zlib" ADA_TARGET="gnat_2018" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" L10N="en de" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="fbdev glint mga r128 radeon dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS ================================================================= Package Settings ================================================================= dev-lang/python-2.7.16::gentoo was built with the following: USE="ipv6 ncurses readline ssl (threads) (wide-unicode) xml (-berkdb) (-bluetooth) -build -doc -examples -gdbm (-hardened) -libressl -sqlite -tk -wininst" CFLAGS="-O2 -mcpu=niagara2 -pipe -fwrapv" CXXFLAGS="-O2 -mcpu=niagara2 -pipe -fwrapv" LDFLAGS="-Wl,-O1 -Wl,--as-needed -L." dev-lang/python-3.6.5::gentoo was built with the following: USE="ipv6 ncurses readline ssl (threads) xml -build -examples -gdbm (-hardened) -libressl -sqlite -test -tk -wininst" CFLAGS="-O2 -mcpu=niagara2 -pipe -fwrapv" CXXFLAGS="-O2 -mcpu=niagara2 -pipe -fwrapv" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" LDFLAGS="-Wl,-O1 -Wl,--as-needed -L."
Created attachment 592728 [details] bug.c Reproduced on 9.2.0-r1 as well. The suspect is a recent backport: https://gitweb.gentoo.org/proj/gcc-patches.git/tree/9.2.0/gentoo/27_all_sparc-PIC-constant-PR91472.patch Cross-compiler also crashes. Attaching complete reproducer. Crashes as: $ LANG=C sparc-unknown-linux-gnu-gcc -O2 -mcpu=niagara2 -fPIC -c bug.c -o bug.o during RTL pass: reload Python/dtoa.c: In function '_Py_dg_infinity': Python/dtoa.c:1431:1: internal compiler error: Segmentation fault 0x7f8d15dd01cf ??? /usr/src/debug/sys-libs/glibc-2.30-r1/glibc-2.30/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0 0x7f8d15db9f1a __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 <https://bugs.gentoo.org/> for instructions.
Here is the minimal reproducer: $ cat bug.c // sparc-unknown-linux-gnu-gcc -O1 -mcpu=niagara2 -fPIE -c bug.c -o bug.o typedef union { double a; int b[2]; } c; double d(int e) { c f; (&f)->b[0] = 15728640; return e ? -(&f)->a : (&f)->a; } $ /home/slyfox/dev/git/gcc-sparc/gcc/xgcc -B/home/slyfox/dev/git/gcc-sparc/gcc -O1 -mcpu=niagara2 -fPIE -c bug.c -o bug.o during RTL pass: reload bug.c: In function 'd': bug.c:10:1: internal compiler error: Segmentation fault 10 | } | ^ 0xd1ff5f crash_signal ../../gcc/gcc/toplev.c:326 0x7fe845eae1cf ??? /usr/src/debug/sys-libs/glibc-2.30-r1/glibc-2.30/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0 0x99ff10 validize_mem(rtx_def*) ../../gcc/gcc/explow.c:521 0x1060b3d sparc_expand_move(machine_mode, rtx_def**) ../../gcc/gcc/config/sparc/sparc.c:2315 0x129bcb8 gen_movdf(rtx_def*, rtx_def*) ../../gcc/gcc/config/sparc/sparc.md:2469 0x9bc337 insn_gen_fn::operator()(rtx_def*, rtx_def*) const ../../gcc/gcc/recog.h:318 0x9bc337 emit_move_insn_1(rtx_def*, rtx_def*) ../../gcc/gcc/expr.c:3727 0x9bc744 emit_move_insn(rtx_def*, rtx_def*) ../../gcc/gcc/expr.c:3823 0xb84c02 lra_emit_move(rtx_def*, rtx_def*) ../../gcc/gcc/lra.c:499 0xb9ad64 curr_insn_transform ../../gcc/gcc/lra-constraints.c:4397 0xb9c478 lra_constraints(bool) ../../gcc/gcc/lra-constraints.c:4994 0xb85154 lra(_IO_FILE*) ../../gcc/gcc/lra.c:2432 0xb3db51 do_reload ../../gcc/gcc/ira.c:5511 0xb3db51 execute ../../gcc/gcc/ira.c:5697 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.
Filed upstream as https://gcc.gnu.org/PR92095
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=ce7e40b4d2a1bfa4e417ed368b9ce206fa309371 commit ce7e40b4d2a1bfa4e417ed368b9ce206fa309371 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2019-11-04 08:30:01 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2019-11-04 08:30:01 +0000 8.3.0: cut 3 patchset One dropped patch: - 27_all_sparc-PIC-constant-PR91472.patch: restore python codegen on sparc Bug: https://bugs.gentoo.org/697708 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> 8.3.0/gentoo/README.history | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=af8edf96ed0717a820a0c38202eb94de54bc2c83 commit af8edf96ed0717a820a0c38202eb94de54bc2c83 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2019-11-04 08:28:24 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2019-11-04 08:28:24 +0000 9.2.0: cut 3 patchset New patch: + 30_all_arm64-march-native.patch: fix -march= ordering handling on arm64 Dropped patch: - 27_all_sparc-PIC-constant-PR91472.patch: restore python codegen on sparc Bug: https://bugs.gentoo.org/697708 Bug: https://bugs.gentoo.org/695420 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> 9.2.0/gentoo/README.history | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=b4f434e19efe6a9f833149a104885d4dfaf1f43d commit b4f434e19efe6a9f833149a104885d4dfaf1f43d Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2019-11-04 08:25:40 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2019-11-04 08:25:40 +0000 8.3.0: drop 30_all_sparc-PIC-constant-PR91472.patch PR91472 fixed obscure code generation bug on gmp testsuite but introduced gcc regression in compiling python. Let's revert the fix. It will break gmp tests on sparc again but at least restore python building. Reported-by: Rolf Eike Beer Bug: https://bugs.gentoo.org/697708 Bug: https://gcc.gnu.org/PR92095 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> .../gentoo/30_all_sparc-PIC-constant-PR91472.patch | 83 ---------------------- 8.3.0/gentoo/README.history | 3 + 2 files changed, 3 insertions(+), 83 deletions(-) https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=01a86d6fd8497feb5459f4f66a8836a8fae2f5a7 commit 01a86d6fd8497feb5459f4f66a8836a8fae2f5a7 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2019-11-04 08:21:50 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2019-11-04 08:21:50 +0000 9.2.0: drop 27_all_sparc-PIC-constant-PR91472.patch PR91472 fixed obscure code generation bug on gmp testsuite but introduced gcc regression in compiling python. Let's revert the fix. It will break gmp tests on sparc again but at least restore python building. Reported-by: Rolf Eike Beer Bug: https://bugs.gentoo.org/697708 Bug: https://gcc.gnu.org/PR92095 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> .../gentoo/27_all_sparc-PIC-constant-PR91472.patch | 83 ---------------------- 9.2.0/gentoo/README.history | 1 + 2 files changed, 1 insertion(+), 83 deletions(-)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b45ba56a178ea77723a10983d9887381e3d6127c commit b45ba56a178ea77723a10983d9887381e3d6127c Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2019-11-04 09:07:16 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2019-11-04 09:07:46 +0000 sys-devel/gcc: 8.3.0: cut 3 patchset Dropped patch: - 27_all_sparc-PIC-constant-PR91472.patch: restore python codegen on sparc While at it switched to EAPI=7 to add support for selective stripping. Closes: https://bugs.gentoo.org/697708 Closes: https://bugs.gentoo.org/686512 Package-Manager: Portage-2.3.78, Repoman-2.3.17 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> sys-devel/gcc/Manifest | 1 + sys-devel/gcc/gcc-8.3.0-r3.ebuild | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) Additionally, it has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5322b7cf3ceaa44b9effa479de112f4a47044a33 commit 5322b7cf3ceaa44b9effa479de112f4a47044a33 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2019-11-04 09:05:04 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2019-11-04 09:07:44 +0000 sys-devel/gcc: 9.2.0: cut 3 patchset New patch: + 30_all_arm64-march-native.patch: fix -march= ordering handling on arm64 Dropped patch: - 27_all_sparc-PIC-constant-PR91472.patch: restore python codegen on sparc While at it switched to EAPI=7 to add support for selective stripping. Bug: https://bugs.gentoo.org/697708 Bug: https://bugs.gentoo.org/695420 Bug: https://bugs.gentoo.org/686512 Package-Manager: Portage-2.3.78, Repoman-2.3.17 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> sys-devel/gcc/Manifest | 1 + sys-devel/gcc/gcc-9.2.0-r2.ebuild | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=6b896455828ae89e5aa2220493cc224fae315290 commit 6b896455828ae89e5aa2220493cc224fae315290 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2019-11-20 07:27:13 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2019-11-20 07:27:13 +0000 9.2.0: fix gmp test suite failures, take 2 Two new patches: + 27_all_sparc-PIC-constant-PR91472.patch: fix gmp test failure + 32_all_sparc-PIC-constant-part2.patch: fix PIC register initialization Bug: https://gcc.gnu.org/PR91472 Bug: https://gcc.gnu.org/PR92095 Bug: https://bugs.gentoo.org/697708 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> .../gentoo/27_all_sparc-PIC-constant-PR91472.patch | 83 ++++++ 9.2.0/gentoo/32_all_sparc-PIC-constant-part2.patch | 310 +++++++++++++++++++++ 9.2.0/gentoo/README.history | 2 + 3 files changed, 395 insertions(+)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=35beff919bc59076c5c1aa549e04d8119c559261 commit 35beff919bc59076c5c1aa549e04d8119c559261 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2019-12-22 11:07:00 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2019-12-22 11:07:00 +0000 9.2.0: cut 4 patchset 4 new patches: - 27_all_sparc-PIC-constant-PR91472.patch: fix PIC register alocation (bug detected by gmp test suite) - 31_all_openmp-for-SEGV.patch: fix opemnmp for loop condition folding - 32_all_sparc-PIC-constant-part2.patch: fix PIC register allocation (bug detected by python regressin) - 33_all_extend-lifetime.patch: fix lifetime extension on ':?' operator (bug detected by firefox LTO build Bug: https://gcc.gnu.org/PR91472 Bug: https://bugs.gentoo.org/699938 Bug: https://gcc.gnu.org/PR92504 Bug: https://bugs.gentoo.org/697708 Bug: https://gcc.gnu.org/PR92095 Bug: https://bugs.gentoo.org/701866 Bug: https://gcc.gnu.org/PR92831 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> 9.2.0/gentoo/README.history | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=649ef16ea81488d36fae3fa4a8881c9e665d2e7a commit 649ef16ea81488d36fae3fa4a8881c9e665d2e7a Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2019-12-22 11:24:45 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2019-12-22 11:28:34 +0000 sys-devel/gcc: 9.2.0: cut 4 patchset 4 new patches: - 27_all_sparc-PIC-constant-PR91472.patch: fix PIC register alocation (bug detected by gmp test suite) - 31_all_openmp-for-SEGV.patch: fix opemnmp for loop condition folding - 32_all_sparc-PIC-constant-part2.patch: fix PIC register allocation (bug detected by python regressin) - 33_all_extend-lifetime.patch: fix lifetime extension on ':?' operator (bug detected by firefox LTO build Bug: https://gcc.gnu.org/PR91472 Bug: https://bugs.gentoo.org/699938 Bug: https://gcc.gnu.org/PR92504 Bug: https://bugs.gentoo.org/697708 Bug: https://gcc.gnu.org/PR92095 Bug: https://bugs.gentoo.org/701866 Bug: https://gcc.gnu.org/PR92831 Package-Manager: Portage-2.3.82, Repoman-2.3.20 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> sys-devel/gcc/Manifest | 1 + sys-devel/gcc/gcc-9.2.0-r3.ebuild | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+)
Should be fixed in gcc-9.2.0-r3 as well.