https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93816
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2022-01-07 Ever confirmed|0 |1 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Confirmed. B needs to be a template, otherwise GCC rejects it. It is as if GCC forgets that it was a not defined from a class/struct keyword. There are other issues in this area dealing with union which I need to finish up the patch for that.