Summary: | sys-devel/gcc-8.3.0-r2: ICE when building dev-lang/python-3.6.9 on sparc | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Rolf Eike Beer <eike> |
Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | herrtimson |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://gcc.gnu.org/PR92095 | ||
See Also: | https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92095 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 698646 | ||
Attachments: |
build.log
bug.c |
Description
Rolf Eike Beer
2019-10-14 15:49:12 UTC
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. |