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

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Patrick Palka
<ppa...@gcc.gnu.org>:

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

commit r13-8765-gd3659e2dfcc6db83391cd2c6d70097cba35eb4b9
Author: Patrick Palka <ppa...@redhat.com>
Date:   Wed Apr 24 17:49:56 2024 -0400

    c++: constexpr union member access folding [PR114709]

    The object/offset canonicalization performed in cxx_fold_indirect_ref
    is undesirable for union member accesses because it loses information
    about the member being accessed which we may later need to diagnose an
    inactive-member access.  So this patch restricts the canonicalization
    accordingly.

            PR c++/114709

    gcc/cp/ChangeLog:

            * constexpr.cc (cxx_fold_indirect_ref): Restrict object/offset
            canonicalization to RECORD_TYPE member accesses.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/constexpr-union8.C: New test.

    Reviewed-by: Jason Merrill <ja...@redhat.com>
    (cherry picked from commit 0844170e9ef60a8b2f6fba6786672f30ce1c2749)

Reply via email to