https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97866
--- Comment #2 from Ilya Leoshkevich <iii at linux dot ibm.com> --- Never mind, I managed to reproduce it now: ubuntu-focal-amd64$ git rev-parse --short HEAD 77f67db2a47 ubuntu-focal-amd64$ ../configure --target=s390x-linux-gnu --exec-prefix=/usr --disable-bootstrap --disable-multilib --enable-languages=c,c++ ubuntu-focal-amd64$ cat test.cpp typedef long a; typedef void (*b)(a, a, void *); class c { unsigned char *m_fn1(); char d(a); a e(a); void f(); }; b g; void *h; void c::f() { for (a j; j < 6; j++) { unsigned char *flags = m_fn1(); for (a i, k; i < k; i++) { if (flags) continue; int *ff = reinterpret_cast<int *>(d(i)); g(a(ff), e(j), h); } } } ubuntu-focal-amd64$ gcc/xgcc -Bgcc -std=gnu++14 -O2 -c test.cpp during RTL pass: reload test.cpp: In member function ‘void c::f()’: test.cpp:21:1: internal compiler error: in get_insn_freq, at lra.c:1554