@navi check_earlier_gotos in c-decl.cc might be useful for that and c_finish_return in c-typeck.cc are places where gotos are checked and return expressions are created.