https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120335
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #6) > (In reply to eczbek.void from comment #5) > > it seems to compile here: https://godbolt.org/z/dq51b7E3o > > Oh inside a function, outside is not an issue. > > But I suspect that is a different issue dealing with trailing return types > and declarations inside a function. Let me file a seperate bug for that. PR 120340 and yes it does look like a totally seperate issue as the variable is not usable after invalid the trailing return type is used.