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

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-16 branch has been updated by Jakub Jelinek
<[email protected]>:

https://gcc.gnu.org/g:1ff3918285512fb3571424c2519aff07939b8af2

commit r16-9282-g1ff3918285512fb3571424c2519aff07939b8af2
Author: Jakub Jelinek <[email protected]>
Date:   Tue Jun 30 09:26:29 2026 +0200

    c++: Fix up __builtin_is_implicit_lifetime [PR126007]

    https://eel.is/c++draft/class.prop#8.2 says that implicit lifetime
    class shall have at least one trivial eligible constructor.
    We currently walk all ctors and if it is default/copy/move ctor
    which is trivial and not deleted, return true, but as the following
testcase
    shows, we should check also for unsatisfied constraints.

    2026-06-30  Jakub Jelinek  <[email protected]>

            PR c++/126007
            * tree.cc (eligible_special_member_function_p): New function.
            (implicit_lifetime_type_p): Use true instead of 1 in function
comment.
            Add some further comments.  Use eligible_special_member_function_p
            instead of !DECL_DELETED_FN.

            * g++.dg/ext/is_implicit_lifetime3.C: New test.

    Reviewed-by: Jason Merrill <[email protected]>
    (cherry picked from commit 2be174f14c0bea9c0fe979467104d7d9027fe093)

Reply via email to