https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113349
--- Comment #9 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
When we're parsing "decltype([] {}())", we create auto with idx=0 and level=2
(because current_template_depth==1 and we use a TEMPLATE_TYPE_PARM with a level
one deeper than the actual template parms).
Later, we want to instantiate type<1>. To do so, we tsubst_entering_scope with
t=X, args={{int}, {1}}. tsubst_template_args then substitutes the
decltype_type. Then we get to the auto we created previously, while args is
still {{int}, {1}}. Then we wrongly match the auto against 1, which causes the
crash.