[Bug c++/118726] [12/13/14/15 Regression] GCC generates wrong code when using non-structured binding declaration as the condition of a for-loop at O1+ level

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Feb 2 06:50:30 GMT 2025


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|tree-optimization           |c++

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
  d ={v} {CLOBBER};
  d.4_14 = d;
  l_15 = d.4_14 + 1;

This makes it seems like d is in the wrong scope.

I wonder if you could make a testcase using class constructors/deconstructors
to show it is the wrong location ...


More information about the Gcc-bugs mailing list