public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jason Merrill <jason@redhat.com>
To: Nathaniel Shead <nathanieloshead@gmail.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH v4] c++: Check for indirect change of active union member in constexpr [PR101631,PR102286]
Date: Mon, 9 Oct 2023 16:46:46 -0400	[thread overview]
Message-ID: <ffec849c-9f06-437c-adf8-d3830bb3cf1e@redhat.com> (raw)
In-Reply-To: <65235160.170a0220.4cbca.5c7d@mx.google.com>

On 10/8/23 21:03, Nathaniel Shead wrote:
> Ping for https://gcc.gnu.org/pipermail/gcc-patches/2023-September/631203.html
> 
> +	  && (TREE_CODE (t) == MODIFY_EXPR
> +	      /* Also check if initializations have implicit change of active
> +		 member earlier up the access chain.  */
> +	      || !refs->is_empty())

I'm not sure what the cumulative point of these two tests is.  TREE_CODE 
(t) will be either MODIFY_EXPR or INIT_EXPR, and either should be OK.

As I understand it, the problematic case is something like 
constexpr-union2.C, where we're also looking at a MODIFY_EXPR.  So what 
is this check doing?

Incidentally, I think constexpr-union6.C could use a test where we pass 
&u.s to a function other than construct_at, and then try (and fail) to 
assign to the b member from that function.

Jason


  reply	other threads:[~2023-10-09 20:46 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-29 13:35 [PATCH] c++: Check for indirect change of active union member in constexpr [PR101631] Nathaniel Shead
2023-08-30 20:28 ` Jason Merrill
2023-09-01 12:22   ` [PATCH v2] c++: Catch " Nathaniel Shead
2023-09-17 12:46     ` Nathaniel Shead
2023-09-19 21:25     ` Jason Merrill
2023-09-20  0:55       ` Nathaniel Shead
2023-09-20 19:23         ` Jason Merrill
2023-09-21 13:41           ` [PATCH v3] " Nathaniel Shead
2023-09-22 13:21             ` Jason Merrill
2023-09-22 15:01               ` [PATCH v4] c++: Check for indirect change of active union member in constexpr [PR101631,PR102286] Nathaniel Shead
2023-09-23  0:38                 ` Nathaniel Shead
2023-09-23  6:40                   ` Jonathan Wakely
2023-09-23  7:30                     ` [PATCH] libstdc++: Ensure active union member is correctly set Nathaniel Shead
2023-09-23 10:52                       ` Jonathan Wakely
2023-09-27 14:13                       ` Jonathan Wakely
2023-09-28 23:25                         ` Nathaniel Shead
2023-09-29  9:32                           ` Jonathan Wakely
2023-09-29 15:06                             ` Jonathan Wakely
2023-09-29 16:29                               ` Nathaniel Shead
2023-09-29 16:46                                 ` Jonathan Wakely
2023-10-21 14:45                                   ` Jonathan Wakely
2023-10-09  1:03                 ` [PATCH v4] c++: Check for indirect change of active union member in constexpr [PR101631,PR102286] Nathaniel Shead
2023-10-09 20:46                   ` Jason Merrill [this message]
2023-10-10 13:48                     ` [PATCH v5] " Nathaniel Shead
2023-10-12  8:53                       ` [PATCH v6] " Nathaniel Shead
2023-10-12 20:24                         ` Jason Merrill
2023-10-12 22:05                           ` Nathaniel Shead
2023-10-20  3:23                             ` Jason Merrill

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=ffec849c-9f06-437c-adf8-d3830bb3cf1e@redhat.com \
    --to=jason@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=nathanieloshead@gmail.com \
    /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).