public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/114709] [12/13/14 Regression] Incorrect handling of inactive union member access via pointer to member in constant evaluated context since r12-6425
Date: Wed, 24 Apr 2024 21:50:45 +0000	[thread overview]
Message-ID: <bug-114709-4-QmiEUCKQwZ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-114709-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:

https://gcc.gnu.org/g:0844170e9ef60a8b2f6fba6786672f30ce1c2749

commit r14-10110-g0844170e9ef60a8b2f6fba6786672f30ce1c2749
Author: Patrick Palka <ppalka@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 <jason@redhat.com>

  parent reply	other threads:[~2024-04-24 21:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-13  1:59 [Bug c++/114709] New: Incorrect handling of inactive union member access via pointer to member in constant evaluated context 420 at zerberste dot es
2024-04-13  8:51 ` [Bug c++/114709] " pinskia at gcc dot gnu.org
2024-04-13  8:52 ` [Bug c++/114709] [12/13/14 Regression] " pinskia at gcc dot gnu.org
2024-04-17 13:33 ` law at gcc dot gnu.org
2024-04-19  7:19 ` [Bug c++/114709] [12/13/14 Regression] Incorrect handling of inactive union member access via pointer to member in constant evaluated context since r12-6425 jakub at gcc dot gnu.org
2024-04-19 17:51 ` ppalka at gcc dot gnu.org
2024-04-24 21:50 ` cvs-commit at gcc dot gnu.org [this message]
2024-04-24 21:52 ` [Bug c++/114709] [12/13 " ppalka at gcc dot gnu.org
2024-05-13 16:43 ` cvs-commit at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-114709-4-QmiEUCKQwZ@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).