https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114048
Sam James <sjames at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|[14 regression] ICE when |[14 regression] ICE when |building libowfat-0.33 on |building libowfat-0.33 |x86 | --- Comment #3 from Sam James <sjames at gcc dot gnu.org> --- It crashes on amd64 for me too but differently: ``` $ gcc /tmp/foo.c -O2 during GIMPLE pass: fre /tmp/foo.c: In function ‘allprefixed_traverse’: /tmp/foo.c:6:5: internal compiler error: in copy_reference_ops_from_ref, at tree-ssa-sccvn.cc:1185 6 | int allprefixed_traverse(char *top) { | ^~~~~~~~~~~~~~~~~~~~ 0x55da5656e87d copy_reference_ops_from_ref /usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/gcc/tree-ssa-sccvn.cc:1185 /tmp/foo.c:6:5: internal compiler error: Segmentation fault 0x55da5700a7f6 crash_signal /usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/gcc/toplev.cc:317 0x55da582ff8d7 x86_64_fallback_frame_state ./md-unwind-support.h:63 0x55da582ff8d7 uw_frame_state_for /usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/libgcc/unwind-dw2.c:1013 0x55da583009fd _Unwind_Backtrace /usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/libgcc/unwind.inc:303 0x55da57773aa8 backtrace_full /usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/libbacktrace/backtrace.c:127 0x55da561080dd diagnostic_context::action_after_output(diagnostic_t) /usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/gcc/diagnostic.cc:781 0x55da5785edeb diagnostic_action_after_output(diagnostic_context*, diagnostic_t) /usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/gcc/diagnostic.h:1002 0x55da5785edeb diagnostic_context::report_diagnostic(diagnostic_info*) /usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/gcc/diagnostic.cc:1633 0x55da57fa21e8 diagnostic_impl /usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/gcc/diagnostic.cc:1767 0x55da5773d17f internal_error(char const*, ...) /usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/gcc/diagnostic.cc:2225 0x55da57714254 fancy_abort(char const*, int, char const*) /usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/gcc/diagnostic.cc:2336 0x55da5656e87d copy_reference_ops_from_ref /usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/gcc/tree-ssa-sccvn.cc:1185 ``` and w/ valgrind: ``` $ gcc /tmp/foo.c -O2 -wrapper valgrind ==2895261== Memcheck, a memory error detector ==2895261== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al. ==2895261== Using Valgrind-3.23.0.GIT and LibVEX; rerun with -h for copyright info ==2895261== Command: /usr/libexec/gcc/x86_64-pc-linux-gnu/14/cc1 -quiet /tmp/foo.c -quiet -dumpdir a- -dumpbase foo.c -dumpbase-ext .c -mtune=generic -march=x86-64 -O2 -o /tmp/cc89yYYR.s ==2895261== during GIMPLE pass: fre /tmp/foo.c: In function ‘allprefixed_traverse’: /tmp/foo.c:6:5: internal compiler error: in copy_reference_ops_from_ref, at tree-ssa-sccvn.cc:1185 6 | int allprefixed_traverse(char *top) { | ^~~~~~~~~~~~~~~~~~~~ 0x7c787d copy_reference_ops_from_ref /usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/gcc/tree-ssa-sccvn.cc:1185 ==2895261== Invalid read of size 1 ==2895261== at 0x25588D7: x86_64_fallback_frame_state (md-unwind-support.h:63) ==2895261== by 0x25588D7: uw_frame_state_for (unwind-dw2.c:1013) ==2895261== by 0x25599FD: _Unwind_Backtrace (unwind.inc:303) ==2895261== by 0x19CCAA8: backtrace_full (backtrace.c:127) ==2895261== by 0x3610DD: diagnostic_context::action_after_output(diagnostic_t) [clone .cold] (diagnostic.cc:781) ==2895261== by 0x1AB7DEB: UnknownInlinedFun (diagnostic.h:1002) ==2895261== by 0x1AB7DEB: diagnostic_context::report_diagnostic(diagnostic_info*) (diagnostic.cc:1633) ==2895261== by 0x21FB1E8: diagnostic_impl(rich_location*, diagnostic_metadata const*, int, char const*, __va_list_tag (*) [1], diagnostic_t) [clone .lto_priv.0] (diagnostic.cc:1767) ==2895261== by 0x199617F: internal_error(char const*, ...) (diagnostic.cc:2225) ==2895261== by 0x196D254: fancy_abort(char const*, int, char const*) (diagnostic.cc:2336) ==2895261== by 0x7C787D: copy_reference_ops_from_ref(tree_node*, vec<vn_reference_op_struct, va_heap, vl_ptr>*) [clone .lto_priv.0] [clone .cold] (tree-ssa-sccvn.cc:1185) ==2895261== Address 0x864f60e8d98948 is not stack'd, malloc'd or (recently) free'd ==2895261== /tmp/foo.c:6:5: internal compiler error: Segmentation fault ```