Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 949124 - =sys-devel/gcc-15.0.1_pre20250126 produces ICE with dev-lang/ruby-3.4.1 when lto is used: ractor.c:592:1: internal compiler error: SSA corruption
Summary: =sys-devel/gcc-15.0.1_pre20250126 produces ICE with dev-lang/ruby-3.4.1 when ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard: 15 fixed; 14 fixed
Keywords:
: 949210 (view as bug list)
Depends on:
Blocks: gcc-15
  Show dependency tree
 
Reported: 2025-01-31 17:51 UTC by tdr
Modified: 2025-03-01 22:59 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (tdr-emerge--info.txt,6.35 KB, text/plain)
2025-01-31 17:52 UTC, tdr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tdr 2025-01-31 17:51:04 UTC
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
Comment 1 tdr 2025-01-31 17:52:10 UTC
Created attachment 918009 [details]
emerge --info
Comment 2 Kostadin Shishmanov 2025-02-03 00:25:35 UTC
*** Bug 949210 has been marked as a duplicate of this bug. ***
Comment 3 Larry the Git Cow gentoo-dev 2025-02-10 00:00:38 UTC
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(+)
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-02-10 00:00:53 UTC
14 still needs a fix.
Comment 5 Adrien Dessemond 2025-02-18 23:55:47 UTC
I am encountering the very same error with GCC 14.2.1_p20241221.
Disabling LTO was the workaround.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-02-23 05:41:44 UTC
(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.
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-02-23 05:42:21 UTC
I'll see about backporting the fix downstream to 14 tomorrow.
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-02-25 03:20:31 UTC
(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.
Comment 9 Larry the Git Cow gentoo-dev 2025-03-01 22:49:03 UTC
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(+)
Comment 10 Larry the Git Cow gentoo-dev 2025-03-01 22:57:53 UTC
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(-)