https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71265
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> --- In c_make_fname_decl: if (current_function_decl && (!seen_error () || current_function_scope)) bind (..., current_function_scope, ...) The condition is wrong; if current_function_scope is null then we must not call bind, otherwise we segv. That's what happens here because seen_error () is 0 at that point.