https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106399
--- Comment #5 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- This is an equivalent Ada testcase: function Foo (A: Integer) return Integer is function A2 return Integer is (A * A); begin return A2; end; with the same issue. We have been using the to-be-attached patch for years to solve the problem, but it does not seem to work for the C compiler because the prologue_location points to '{' instead of the function declarator.