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

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jakub Jelinek
<ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:6f61195e0433f907e5aa1a16f02d4106503d3351

commit r11-8997-g6f61195e0433f907e5aa1a16f02d4106503d3351
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Tue Sep 14 16:55:04 2021 +0200

    c++: Fix __is_*constructible/assignable for templates [PR102305]

    is_xible_helper returns error_mark_node (i.e. false from the traits)
    for abstract classes by testing ABSTRACT_CLASS_TYPE_P (to) early.
    Unfortunately, as the testcase shows, that doesn't work on class templates
    that haven't been instantiated yet, ABSTRACT_CLASS_TYPE_P for them is false
    until it is instantiated, which is done when the routine later constructs
    a dummy object with that type.

    The following patch fixes this by calling complete_type first, so that
    ABSTRACT_CLASS_TYPE_P test will work properly, while keeping the handling
    of arrays with unknown bounds, or incomplete types where it is done
    currently.

    2021-09-14  Jakub Jelinek  <ja...@redhat.com>

            PR c++/102305
            * method.c (is_xible_helper): Call complete_type on to.

            * g++.dg/cpp0x/pr102305.C: New test.

    (cherry picked from commit f008fd3a480e3718436156697ebe7eeb47841457)

Reply via email to