https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128262
Bug ID: 128262
Summary: ICE at O2: verify_gimple failed during GIMPLE pass:
forwprop
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: bic60176 at gmail dot com
Target Milestone: ---
Created attachment 66022
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=66022&action=edit
testcase
Compiler Explorer: https://godbolt.org/z/YcKEqjcs5
Console:
<source>: In function 'clearS2':
<source>:9:1: error: invalid offset operand in 'mem_ref'
9 | clearS2(__seg_gs S2 *p, int n)
| ^~~~~~~
MEM <<address-space-2> struct S2> [(struct *)p_5(D) + (struct
{
<unnamed-signed:7> v;
} *) 0B];
# .MEM_6 = VDEF <.MEM_2>
MEM <<address-space-2> struct S2> [(struct *)p_5(D) + (struct
{
<unnamed-signed:7> v;
} *) 0B].s1[i_1].v = 1;
during GIMPLE pass: forwprop
<source>:9:1: internal compiler error: verify_gimple failed
0x2912368 diagnostics::context::diagnostic_impl(rich_location*,
diagnostics::metadata const*, diagnostics::option_id, char const*,
__va_list_tag (*) [1], diagnostics::kind)
???:0
0x2906fab internal_error(char const*, ...)
???:0
0x12d45fe verify_gimple_in_cfg(function*, bool, bool)
???:0
/cefs/7f/7fa6d45b591391d387e52988_gcc-trunk-20261028/bin/../libexec/gcc/x86_64-linux-gnu/17.0.0/cc1
-quiet -imultiarch x86_64-linux-gnu -iprefix
/cefs/7f/7fa6d45b591391d387e52988_gcc-trunk-20261028/bin/../lib/gcc/x86_64-linux-gnu/17.0.0/
<source> -quiet -dumpdir /app/ -dumpbase output.c -dumpbase-ext .c -masm=intel
-mtune=generic -march=x86-64 -g -O2 -fdiagnostics-color=always -fno-verbose-asm
-o /app/output.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.
Compiler returned: 1