https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102980
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Known to fail| |10.1.0 Known to work| |9.1.0, 9.4.0 Keywords| |needs-bisection Last reconfirmed| |2021-10-28 Status|UNCONFIRMED |NEW --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Confirmed reduced self contained (no header) testcase: struct a { constexpr int size(void){return 0;} }; template<class T> int parse1() { a b; return int{b.size()}; } Note the constexpr is important here.