https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127436
Bug ID: 127436
Summary: ICE: Segmentation fault on store_expr
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: kyuwoncho18 at gmail dot com
Target Milestone: ---
### Reproducer
void __GIMPLE f (int (*p)[])
{
*p_1(D) = _Literal (int[]) {};
}
Build with gcc -fgimple, and stack trace:
<source>: In function 'f':
<source>:3:3: error: invalid use of array with unspecified bounds
3 | *p_1(D) = _Literal (int[]) {};
| ^~~~
during RTL pass: expand
<source>:3:3: internal compiler error: Segmentation fault
0x28ba388 diagnostics::context::diagnostic_impl(rich_location*,
diagnostics::metadata const*, diagnostics::option_id, char const*,
__va_list_tag (*) [1], diagnostics::kind)
???:0
0x28aefcb internal_error(char const*, ...)
???:0
0xdb5dbe store_constructor(tree_node*, rtx_def*, int, poly_int<1u, long>, bool)
???:0
0xda46e0 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
???:0
0xdb1e3f store_expr(tree_node*, rtx_def*, int, bool, bool)
???:0
/cefs/4d/4def24af46b2d72adc7520aa_gcc-trunk-20260916/bin/../libexec/gcc/x86_64-linux-gnu/17.0.0/cc1
-quiet -imultiarch x86_64-linux-gnu -iprefix
/cefs/4d/4def24af46b2d72adc7520aa_gcc-trunk-20260916/bin/../lib/gcc/x86_64-linux-gnu/17.0.0/
<source> -quiet -dumpdir /app/output.s- -dumpbase example.c -dumpbase-ext .c
-mtune=generic -march=x86-64 -g -fdiagnostics-color=always -fno-verbose-asm
-fgimple -o /tmp/ccW5Bvyj.s
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.
Reproduced up to 10.3 with assertion (the oldest version on gcc.godbolt), and I
assume there are more affected compiler versions.