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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2023-11-21
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>and any level of optimization enabled,

No, it just at -O1, -Os and -Og. At -O2 and -O3 we are able to optimize the
first load of w.first out and end up with no uninitialized variable warning.

Basically it comes down to this:
```
  QBenchmarkIterationController::QBenchmarkIterationController (&w.controller);
  w.first = 1;
  goto <bb 4>; [100.00%]

....

  <bb 4> [local count: 1073741824]:
  # result_4 = PHI <result_8(D)(2), result_13(3)>
  _18 = w.first;
  if (_18 != 0)
    goto <bb 7>; [67.00%]
  else
    goto <bb 5>; [33.00%]
```
not being optimized ... I am not so sure if this is fixable, especially at -Og.
-Os might be. -O1 is in a similar situtation as -Os though. compile speed vs
runtime speed ...

Reply via email to