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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |tree-optimization
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2023-09-07
   Target Milestone|---                         |11.5
      Known to work|                            |5.1.0
           Keywords|                            |needs-bisection, wrong-code
      Known to fail|                            |6.1.0
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed, note that patch just exposed a latent bug. Here is a testcase which
shows the failure even in GCC 6 but works in GCC 5:
```

int a;
int b;
int c(int d, int e, int f) {
  if (d < e)
    return e;
  return (d > f) ? f : d;
}
int main() {
  int g = -1;
  a = c(b + 30, 29, g + 29);
  volatile int t = a;
  if (a != 28)
    __builtin_trap();
}
```

Reply via email to