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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[11 Regression] Faulty      |[11 Regression] Faulty
                   |optimization in nested      |optimization in nested
                   |loops with -O2              |loops with -O2 since
                   |                            |r11-2574-g6aec53ee4f75a64c
                 CC|                            |marxin at gcc dot gnu.org,
                   |                            |rguenth at gcc dot gnu.org

--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
Slightly modified test-case:

at pr96760.c
char a = 0, f = 0, c = 5;
unsigned long d = 0;
int g = 0;
int *e = &g;

int main() {
  char  b = 0;
  for (;;) {
    for (a = 0; a < 2; a++) { // no UB I believe
      if (c) {
        if (d != 0)
          __builtin_abort ();
        return 0; 
      }
    }
    f = (d++, *e);
  }

  return 1;
}

started with r11-2574-g6aec53ee4f75a64c

Reply via email to