https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112632

--- Comment #9 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Jason Merrill <[email protected]>:

https://gcc.gnu.org/g:d58f2e5453c6d7dc93315fb324f55607241c91f9

commit r16-5833-gd58f2e5453c6d7dc93315fb324f55607241c91f9
Author: Jason Merrill <[email protected]>
Date:   Tue Dec 2 18:18:39 2025 +0530

    c++: alias template parm conv and redecl [PR122171]

    Here when substituting BITS into poly_table convert_template_argument adds
    an IMPLICIT_CONV_EXPR to represent the conversion to the alias template
    parameter.  In r16-4115 I extended that to value-dependent arguments as
well
    as type-dependent, in case the conversion turns out to be narrowing.
    tsubst_expr needs the same change so maybe_update_decl_type doesn't
    replace the IMPLICIT_CONV_EXPR with a NOP_EXPR.

    The do_auto_deduction change is to avoid a regression in nontype-auto21.C
    when the first test is changed from uses_template_parms (as it was in
    convert_template_argument) to dependent_type_p; this mattered because we
    were failing to resolve the auto return type before deducing the auto
    non-type parameter type from helper<token>::c.  Many other places that call
    resolve_nondeduced_context similarly then call mark_single_function.

            PR c++/122171
            PR c++/112632

    gcc/cp/ChangeLog:

            * pt.cc (dependent_implict_conv_p): Split out...
            (convert_template_argument): ...from here.
            (tsubst_expr) [IMPLICIT_CONV_EXPR]: Use it.
            (do_auto_deduction): Call mark_single_function.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/alias-decl-conv1.C: New test.

Reply via email to