https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89953
--- Comment #14 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
The problem is that here
24072 /* Instantiate a dynamic exception-specification. noexcept will be
24073 handled below. */
24074 if (tree raises = TYPE_RAISES_EXCEPTIONS (TREE_TYPE
(code_pattern)))
24075 if (TREE_VALUE (raises))
24076 {
24077 specs = tsubst_exception_specification (TREE_TYPE
(code_pattern),
24078 args, tf_error,
NULL_TREE,
24079 /*defer_ok*/false);
raises is NOEXCEPT_EXPR<{}>, but its TREE_VALUE is null, so we don't
substitute.