https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122184
Bug ID: 122184
Summary: [16 Regression] ICE: SIGSEGV in verify_use
(tree-ssa.cc:873) with -O -fstack-check=generic
-fhardened
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: zsojka at seznam dot cz
Target Milestone: ---
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Created attachment 62513
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=62513&action=edit
reduced testcase
Compiler output:
$ x86_64-pc-linux-gnu-g++ -O -fstack-check=generic -fhardened testcase.C -w
-wrapper valgrind,-q
==3399== Invalid read of size 1
==3399== at 0x1BB6DDD: verify_use(basic_block_def*, basic_block_def*,
ssa_use_operand_t*, gimple*, bool, bitmap_head*) (tree-ssa.cc:873)
==3399== by 0x1BBAA72: verify_ssa(bool, bool) (tree-ssa.cc:1156)
==3399== by 0x17D43A4: execute_function_todo(function*, void*)
(passes.cc:2104)
==3399== by 0x17D481E: execute_todo(unsigned int) (passes.cc:2149)
==3399== by 0x17D7B4E: execute_one_pass(opt_pass*) (passes.cc:2694)
==3399== by 0x17D805F: execute_pass_list_1(opt_pass*) (passes.cc:2757)
==3399== by 0x17D8098: execute_pass_list(function*, opt_pass*)
(passes.cc:2768)
==3399== by 0x17D8A04: do_per_function_toporder(void (*)(function*, void*),
void*) [clone .part.0] (passes.cc:1782)
==3399== by 0x17D8C3E: do_per_function_toporder (passes.cc:1749)
==3399== by 0x17D8C3E: execute_ipa_pass_list(opt_pass*) (passes.cc:3106)
==3399== by 0x136E808: ipa_passes (cgraphunit.cc:2237)
==3399== by 0x136E808: symbol_table::compile() [clone .part.0]
(cgraphunit.cc:2360)
==3399== by 0x137179D: compile (cgraphunit.cc:2338)
==3399== by 0x137179D: symbol_table::finalize_compilation_unit()
(cgraphunit.cc:2617)
==3399== by 0x1929B82: compile_file() (toplev.cc:480)
==3399== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==3399==
during GIMPLE pass: ssa
testcase.C: In function 'void shader_cache_write_program_metadata()':
testcase.C:7:1: internal compiler error: Segmentation fault
7 | }
| ^
0x2ef53ac internal_error(char const*, ...)
/repo/gcc-trunk/gcc/diagnostic-global-context.cc:786
0x192954f crash_signal
/repo/gcc-trunk/gcc/toplev.cc:323
0x1bb6ddd verify_use
/repo/gcc-trunk/gcc/tree-ssa.cc:873
0x1bbaa72 verify_ssa(bool, bool)
/repo/gcc-trunk/gcc/tree-ssa.cc:1156
0x17d43a4 execute_function_todo
/repo/gcc-trunk/gcc/passes.cc:2104
0x17d481e execute_todo
/repo/gcc-trunk/gcc/passes.cc:2149
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
$ x86_64-pc-linux-gnu-g++ -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-g++
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-20251007040541-r16-4261-gd3e963d1ccc350-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/16.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--disable-bootstrap --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --enable-libsanitizer
--disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-20251007040541-r16-4261-gd3e963d1ccc350-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 16.0.0 20251007 (experimental) (GCC)