https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106783
Bug ID: 106783 Summary: [12/13 Regression] ICE in ipa-modref.cc:analyze_function Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: amonakov at gcc dot gnu.org CC: amonakov at gcc dot gnu.org, asolokha at gmx dot com, marxin at gcc dot gnu.org, unassigned at gcc dot gnu.org Target Milestone: --- +++ This bug was initially created as a clone of Bug #106781 +++ ICEs when emitting a tree dump with -O2 -fdump-tree-modref2 int n; __attribute__ ((noinline,noclone,returns_twice)) static int bar (int) { n /= 0; return n; } int foo (int x) { return bar (x); } t.c: In function ‘foo’: t.c:12:1: internal compiler error: in analyze_function, at ipa-modref.cc:3286 12 | foo (int x) | ^~~ 0x10e548e analyze_function gcc/ipa-modref.cc:3286 0x10e83b5 execute gcc/ipa-modref.cc:4186 Note that -fdump-tree-modref2 is needed. It reaches a gcc_unreachable(), I'd suggest to move the verification outside of dumping if possible, so the compiler doesn't ICE or not depending on whether dumping is requested.