g++ gives segmentation fault while compiling Reproducible: Always
Stack Trace: Thread 2.1 "cc1plus" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xfffff7fbb020 (LWP 437183)] mark_jump_label_1 (x=<optimized out>, insn=insn@entry=0xffffe814d4c0, in_mem=in_mem@entry=false, is_target=is_target@entry=false) at /var/tmp/portage/sys-devel/gcc-14.2.1_p20241221/work/gcc-14-20241221/gcc/jump.cc:1051 warning: 1051 /var/tmp/portage/sys-devel/gcc-14.2.1_p20241221/work/gcc-14-20241221/gcc/jump.cc: No such file or directory (gdb) bt #0 mark_jump_label_1 (x=<optimized out>, insn=insn@entry=0xffffe814d4c0, in_mem=in_mem@entry=false, is_target=is_target@entry=false) at /var/tmp/portage/sys-devel/gcc-14.2.1_p20241221/work/gcc-14-20241221/gcc/jump.cc:1051 #1 0x0000aaaaab7397d8 in mark_jump_label_1 (x=<optimized out>, insn=insn@entry=0xffffe814d4c0, in_mem=in_mem@entry=false, is_target=is_target@entry=false) at /var/tmp/portage/sys-devel/gcc-14.2.1_p20241221/work/gcc-14-20241221/gcc/jump.cc:1174 #2 0x0000aaaaab7397d8 in mark_jump_label_1 (x=<optimized out>, insn=0xffffe814d4c0, in_mem=false, is_target=<optimized out>) at /var/tmp/portage/sys-devel/gcc-14.2.1_p20241221/work/gcc-14-20241221/gcc/jump.cc:1174 #3 0x0000aaaaab7399a8 in mark_all_labels (f=f@entry=0xffffe8149bd0) at /var/tmp/portage/sys-devel/gcc-14.2.1_p20241221/work/gcc-14-20241221/gcc/jump.cc:335 #4 0x0000aaaaab739cc0 in rebuild_jump_labels_1 (f=0xffffe8149bd0, count_forced=true) at /var/tmp/portage/sys-devel/gcc-14.2.1_p20241221/work/gcc-14-20241221/gcc/jump.cc:74 #5 rebuild_jump_labels (f=0xffffe8149bd0) at /var/tmp/portage/sys-devel/gcc-14.2.1_p20241221/work/gcc-14-20241221/gcc/jump.cc:98 #6 0x0000aaaaab455564 in (anonymous namespace)::pass_expand::execute (this=<optimized out>, fun=0xffffe8639a80) at /var/tmp/portage/sys-devel/gcc-14.2.1_p20241221/work/gcc-14-20241221/gcc/emit-rtl.h:434 #7 0x0000aaaaab810c70 in execute_one_pass (pass=pass@entry=0xaaaaad37fb60) at /var/tmp/portage/sys-devel/gcc-14.2.1_p20241221/work/gcc-14-20241221/gcc/passes.cc:2647 #8 0x0000aaaaab8114d8 in execute_pass_list_1 (pass=0xaaaaad37fb60) at /var/tmp/portage/sys-devel/gcc-14.2.1_p20241221/work/gcc-14-20241221/gcc/passes.cc:2756 #9 0x0000aaaaab811548 in execute_pass_list (fn=<optimized out>, pass=<optimized out>) at /var/tmp/portage/sys-devel/gcc-14.2.1_p20241221/work/gcc-14-20241221/gcc/passes.cc:2767 #10 0x0000aaaaab48efd8 in cgraph_node::expand (this=0xffffe8638880) at /var/tmp/portage/sys-devel/gcc-14.2.1_p20241221/work/gcc-14-20241221/gcc/context.h:48 #11 cgraph_node::expand (this=0xffffe8638880) at /var/tmp/portage/sys-devel/gcc-14.2.1_p20241221/work/gcc-14-20241221/gcc/cgraphunit.cc:1798 #12 0x0000aaaaab490c84 in expand_all_functions () at /var/tmp/portage/sys-devel/gcc-14.2.1_p20241221/work/gcc-14-20241221/gcc/cgraphunit.cc:2028 #13 symbol_table::compile (this=this@entry=0xffffe9a06000) at /var/tmp/portage/sys-devel/gcc-14.2.1_p20241221/work/gcc-14-20241221/gcc/cgraphunit.cc:2404 #14 0x0000aaaaab492b2c in symbol_table::compile (this=0xffffe9a06000) at /var/tmp/portage/sys-devel/gcc-14.2.1_p20241221/work/gcc-14-20241221/gcc/cgraphunit.cc:2315 #15 symbol_table::finalize_compilation_unit (this=0xffffe9a06000) at /var/tmp/portage/sys-devel/gcc-14.2.1_p20241221/work/gcc-14-20241221/gcc/cgraphunit.cc:2589 #16 0x0000aaaaab919414 in compile_file () at /var/tmp/portage/sys-devel/gcc-14.2.1_p20241221/work/gcc-14-20241221/gcc/toplev.cc:476 #17 0x0000aaaaab14d550 in do_compile () at /var/tmp/portage/sys-devel/gcc-14.2.1_p20241221/work/gcc-14-20241221/gcc/toplev.cc:2158 #18 toplev::main (this=this@entry=0xffffffffed40, argc=<optimized out>, argc@entry=16, argv=<optimized out>, argv@entry=0xffffffffeef8) at /var/tmp/portage/sys-devel/gcc-14.2.1_p20241221/work/gcc-14-20241221/gcc/toplev.cc:2314 #19 0x0000aaaaab14ead4 in main (argc=16, argv=0xffffffffeef8) at /var/tmp/portage/sys-devel/gcc-14.2.1_p20241221/work/gcc-14-20241221/gcc/main.cc:39
Command line: g++ -O2 -fno-math-errno -c Activation.cpp
Created attachment 920113 [details] Activation.cpp This source file is taken from sci-libs/caffe2 (and reduced)
Thanks. Trunk fails too. Reported upstream at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119087.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=648370cbe402edecd4e696348bf35c6fa056e4b5 commit 648370cbe402edecd4e696348bf35c6fa056e4b5 Author: Sam James <sam@gentoo.org> AuthorDate: 2025-03-09 22:42:49 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-03-09 22:42:58 +0000 sys-devel/gcc: add 15.0.1_pre20250309 Bug: https://bugs.gentoo.org/950463 Bug: https://bugs.gentoo.org/950652 Closes: https://bugs.gentoo.org/949343 Signed-off-by: Sam James <sam@gentoo.org> sys-devel/gcc/Manifest | 1 + sys-devel/gcc/gcc-15.0.1_pre20250309.ebuild | 52 +++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+)