https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113340
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> --- I suppose the following would be one way to fix it: --- a/gcc/cp/decl2.cc +++ b/gcc/cp/decl2.cc @@ -312,6 +312,12 @@ maybe_retrofit_in_chrg (tree fn) basetype = TREE_TYPE (TREE_VALUE (arg_types)); arg_types = TREE_CHAIN (arg_types); + if (!DECL_ARGUMENTS (fn)) + { + gcc_checking_assert (seen_error ()); + return; + } + parms = DECL_CHAIN (DECL_ARGUMENTS (fn)); /* If this is a subobject constructor or destructor, our caller will