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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |11.2.0, 12.0
           Keywords|                            |rejects-valid
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=102538
             Status|UNCONFIRMED                 |NEW
      Known to work|                            |10.1.0, 10.2.0, 10.3.0
                 CC|                            |jason at gcc dot gnu.org,
                   |                            |ppalka at gcc dot gnu.org
            Summary|accessing incorrect storage |[10/11/12 Regression]
                   |for union at constexpr      |accessing incorrect storage
                   |context                     |for designated init of
                   |                            |anonymous union at
                   |                            |constexpr context
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-11-17
   Target Milestone|---                         |10.4

--- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Started with r12-954, which has also been backported to the 11/10 branches.

Reduced rejects-valid testcase:

struct foo {
  union {
    int fp1{};
    char fp2;
  };
};

static_assert(foo{.fp2={}}.fp2 == 0);

Reply via email to