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

Szőts Ákos <szotsaki at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |szotsaki at gmail dot com

--- Comment #41 from Szőts Ákos <szotsaki at gmail dot com> ---
A newer example:

int main() {
  bool exists = true;
  int i = 0;
  int sum = 0;

  volatile int array_size = 7;
  volatile int array[7];

  while (exists)
  {
    for (i = 0; i < array_size - 1; i++)
    {
      if (array[i] == 0) sum += array[i + 1];
      exists = false;
    }
  }

  return 0;
}

Can be reproduced both by v5.3.0 and v6.1.1 with "g++ -O3 -Wall main.cpp".

Reply via email to