https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102118
Bug ID: 102118 Summary: ice in merge, at ipa-modref-tree.h:203 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: dcb314 at hotmail dot com Target Milestone: --- For this C code: typedef struct { int large_page_addr; long n_used_entries } CPUTLBDesc; typedef struct { long mask } CPUTLBDescFast; typedef struct { CPUTLBDesc d[8]; CPUTLBDescFast f[] } CPUTLB; typedef int RISCVCPU; CPUTLB *tlb_flush_page_bits_locked___trans_tmp_8, *tlb_flush_page_bits_locked___trans_tmp_6, *tlb_flush_page_bits_locked___trans_tmp_4; void tlb_flush_page_bits_locked(int *env, int midx) { { int *__trans_tmp_5 = env; { RISCVCPU *arch_cpu = __trans_tmp_5; tlb_flush_page_bits_locked___trans_tmp_4 = arch_cpu; } } CPUTLBDesc *d = &tlb_flush_page_bits_locked___trans_tmp_4->d[midx]; { int *__trans_tmp_7 = env; { RISCVCPU *arch_cpu = __trans_tmp_7; tlb_flush_page_bits_locked___trans_tmp_6 = arch_cpu; } } if (tlb_flush_page_bits_locked___trans_tmp_6->f[midx].mask) if (d->large_page_addr) { int *__trans_tmp_3 = env; { { RISCVCPU *arch_cpu = __trans_tmp_3; tlb_flush_page_bits_locked___trans_tmp_8 = arch_cpu; } tlb_flush_page_bits_locked___trans_tmp_8->d[midx].n_used_entries--; } } } compiled by recent gcc trunk and compiler flag -O1, does this: during GIMPLE pass: modref bug752.c: In function ‘tlb_flush_page_bits_locked’: bug752.c:43:1: internal compiler error: in merge, at ipa-modref-tree.h:203 43 | } | ^ 0xae7448 modref_access_node::merge(modref_access_node const&, bool) ../../trunk.git/gcc/ipa-modref-tree.h:203 The code was fine at git hash 3ac6b5cff1eca4e1 and broken at hash e28ac73af20028f8