https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81675
Marcin Kowalczyk <qrczakmk at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |qrczakmk at gmail dot com --- Comment #7 from Marcin Kowalczyk <qrczakmk at gmail dot com> --- The bug is actually present in gcc-12.2.0 if foo() is a template (add "template <typename T>" before "int foo()").