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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2023-04-06
      Known to fail|                            |12.1.0
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
           Keywords|                            |needs-bisection,
                   |                            |needs-reduction
            Summary|std::optional weird         |[12/13 Regression]
                   |-Wmaybe-unitialized and     |std::optional weird
                   |behaviour with -O2          |-Wmaybe-unitialized and
                   |                            |behaviour with -O2
   Target Milestone|---                         |12.3
      Known to work|                            |10.1.0, 11.1.0

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
DSE2 removes the original store:

  optInt = {};
  optInt = foo ();


  Deleted dead store: optInt = {};

Even though foo can throw ...

Confirmed.

Reply via email to