https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113620
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|ice-on-invalid-code |ice-on-valid-code Known to fail| |5.1.0 --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Xi Ruoyao from comment #1) > With -std=c++17 it's fine: > > t1.c:19:5: error: need 'typename' before 'DEF::TYP' because 'DEF' is a > dependent scope > 19 | DEF::TYP r=DEF::INIT; > | ^~~ > | typename Note once you add the typename (which is optional in C++20 by the way), the ICE is back in C++11 mode even. This has been ICEing from at least GCC 5.1.0.