Hi, in this relatively serious ICE on invalid regression (we don't emit any message before ICEing) make_typename_type, called by strip_typedefs, returns error_mark_node which then isn't handled by typedef_variant_p. Indeed, Jakub noticed that the same in principle can happen when strip_typedefs calls finish_decltype_type. make_typename_type is passed tf_none therefore cannot emit the diagnostic we want before the ICE anyway, thus it seems to me that we also have one of those well known issues about not propagating a tusbst_flags_t flag: canonicalize_type_argument (and canonicalize_expr_argument) get a tusbst_flags_t but doesn't propagate it to strip_typedefs (and strip_typedefs_expr). Implementing the straightforward set of changes, consistently for strip_typedefs, strip_typedefs_expr and the related functions plus checking the return values of make_typename_type and finish_decltype_type for error_mark_node (only make_typename_type would be enough for the testcase at issue) appears to solve the problem without introducing regressions. Does that make sense? Thanks, Paolo. /////////////////////////////