https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97830
--- Comment #3 from David Binderman <dcb314 at hotmail dot com> --- Reduced C code is: a; b() { ((void (*)())b)(a); b(a); } Interestingly, this similar code int a; void b() { ((void (*)())b)(a); b(a); } compiles fine.