Compiler error when building =ruby-3.4.1 with -flto enabled Reproducible: Always Actual Results: Unable to coalesce ssa_names 33 and 35 which are marked as MUST COALESCE. _ec_33(ab) and _ec_35(ab) during RTL pass: expand ../../var/tmp/portage/dev-lang/ruby-3.4.1-r1/work/ruby-3.4.1/ractor.c: In function ‘ractor_check_ints.constprop’: ../../var/tmp/portage/dev-lang/ruby-3.4.1-r1/work/ruby-3.4.1/ractor.c:592:1: internal compiler error: SSA corruption 592 | ractor_check_ints(rb_execution_context_t *ec, rb_ractor_t *cr, ractor_sleep_cleanup_function cf_func, void *cf_data) | ^ 0x5598c7ae8234 internal_error(char const*, ...) /usr/src/debug/sys-devel/gcc-15.0.1_pre20250126/gcc-15-20250126/gcc/diagnostic-global-context.cc:517 0x5598c61b8565 fail_abnormal_edge_coalesce /usr/src/debug/sys-devel/gcc-15.0.1_pre20250126/gcc-15-20250126/gcc/tree-ssa-coalesce.cc:1012 0x5598c61b8565 coalesce_partitions /usr/src/debug/sys-devel/gcc-15.0.1_pre20250126/gcc-15-20250126/gcc/tree-ssa-coalesce.cc:1444 0x5598c61b94ad coalesce_ssa_name(_var_map*) /usr/src/debug/sys-devel/gcc-15.0.1_pre20250126/gcc-15-20250126/gcc/tree-ssa-coalesce.cc:1898 0x5598c6105d61 remove_ssa_form /usr/src/debug/sys-devel/gcc-15.0.1_pre20250126/gcc-15-20250126/gcc/tree-outof-ssa.cc:1069 0x5598c6105d61 rewrite_out_of_ssa(ssaexpand*) /usr/src/debug/sys-devel/gcc-15.0.1_pre20250126/gcc-15-20250126/gcc/tree-outof-ssa.cc:1357 0x5598c5871ed3 execute /usr/src/debug/sys-devel/gcc-15.0.1_pre20250126/gcc-15-20250126/gcc/cfgexpand.cc:6955 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://bugs.gentoo.org/> for instructions. make: *** [/tmp/ccolZslg.mk:2: /tmp/ccGLHZqh.ltrans0.ltrans.o] Error 1 lto-wrapper: fatal error: make returned 2 exit status compilation terminated. /usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status Builds successfully without lto enabled
Created attachment 918009 [details] emerge --info
*** Bug 949210 has been marked as a duplicate of this bug. ***
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90d3cca0095f4a1240eefa8aa3fa8923f9e61680 commit 90d3cca0095f4a1240eefa8aa3fa8923f9e61680 Author: Sam James <sam@gentoo.org> AuthorDate: 2025-02-10 00:00:03 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-02-10 00:00:03 +0000 sys-devel/gcc: add 15.0.1_pre20250209 Bug: https://bugs.gentoo.org/942672 Closes: https://bugs.gentoo.org/949124 Closes: https://bugs.gentoo.org/949388 Signed-off-by: Sam James <sam@gentoo.org> sys-devel/gcc/Manifest | 2 ++ sys-devel/gcc/gcc-15.0.1_pre20250209.ebuild | 53 +++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+)
14 still needs a fix.
I am encountering the very same error with GCC 14.2.1_p20241221. Disabling LTO was the workaround.
(In reply to Adrien Dessemond from comment #5) > I am encountering the very same error with GCC 14.2.1_p20241221. > Disabling LTO was the workaround. Yes, see the whiteboard and my comment above.
I'll see about backporting the fix downstream to 14 tomorrow.
(In reply to Sam James from comment #7) > I'll see about backporting the fix downstream to 14 tomorrow. richi did it himself earlier -- I'll just wait until the next snapshot this week.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cbba8f5e9467b657537de2c72d114aac3aa9f761 commit cbba8f5e9467b657537de2c72d114aac3aa9f761 Author: Sam James <sam@gentoo.org> AuthorDate: 2025-03-01 22:43:05 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-03-01 22:43:05 +0000 sys-devel/gcc: add 14.2.1_p20250301 Bug: https://bugs.gentoo.org/949124 Signed-off-by: Sam James <sam@gentoo.org> sys-devel/gcc/Manifest | 1 + sys-devel/gcc/gcc-14.2.1_p20250301.ebuild | 54 +++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e18c2c742f1cb17061c6491050047164949741ef commit e18c2c742f1cb17061c6491050047164949741ef Author: Sam James <sam@gentoo.org> AuthorDate: 2025-03-01 22:55:23 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-03-01 22:55:23 +0000 sys-devel/gcc: keyword 14.2.1_p20250301 Bug: https://bugs.gentoo.org/949124 Signed-off-by: Sam James <sam@gentoo.org> sys-devel/gcc/gcc-14.2.1_p20250301.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)