https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111823
Bug ID: 111823 Summary: ICE on valid code at -O1 and above on x86_64-linux-gnu: in verify_sra_access_forest, at tree-sra.cc:2414 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: zhendong.su at inf dot ethz.ch Target Milestone: --- It appears to be a recent regression. Compiler Explorer: https://godbolt.org/z/jMsxnbTcK [514] % gcctk -v Using built-in specs. COLLECT_GCC=gcctk COLLECT_LTO_WRAPPER=/local/suz-local/software/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/14.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-trunk/configure --disable-bootstrap --enable-checking=yes --prefix=/local/suz-local/software/local/gcc-trunk --enable-sanitizers --enable-languages=c,c++ --disable-werror --enable-multilib Thread model: posix Supported LTO compression algorithms: zlib gcc version 14.0.0 20231015 (experimental) (GCC) [515] % [515] % gcctk -O1 small.c during GIMPLE pass: esra small.c: In function ‘main’: small.c:9:1: internal compiler error: in verify_sra_access_forest, at tree-sra.cc:2414 9 | } | ^ 0x85c78c verify_sra_access_forest(access*) ../../gcc-trunk/gcc/tree-sra.cc:2414 0x1209a92 verify_all_sra_access_forests() ../../gcc-trunk/gcc/tree-sra.cc:2465 0x120d6b4 analyze_all_variable_accesses ../../gcc-trunk/gcc/tree-sra.cc:3534 0x120dc01 perform_intra_sra ../../gcc-trunk/gcc/tree-sra.cc:4726 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. [516] % [516] % cat small.c static struct A { int x : 4; } a; static int b; int main() { struct A t[2]; t[0] = b ? t[1] : a; return (b ? t[1].x : 0) && 1; }