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