https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106421
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- > The documentation might want to specify that goto from a nested function It already does. from https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Labels-as-Values.html#Labels-as-Values : "You may not use this mechanism to jump to code in a different function."