On Thu, 15 May 2025 at 18:19, Jason Merrill <ja...@redhat.com> wrote:
> > @@ -3347,8 +3347,6 @@ cp_fold (tree x, fold_flags_t flags) > > || id_equal (DECL_NAME (callee), "as_const"))) > > { > > r = CALL_EXPR_ARG (x, 0); > > - if (!same_type_p (TREE_TYPE (x), TREE_TYPE (r))) > > - r = build_nop (TREE_TYPE (x), r); > > This is removing the conversion entirely; I'm rather surprised it didn't > break anything. I thought you were thinking to make the build_nop > unconditional. Oops. Yes, that makes more sense. I am confused how that build_nop actually works, but it indeed should convert r to x, and not be completely nuked. Re-doing...