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

            Bug ID: 65418
           Summary: [5 Regression] vim miscompilation
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: jakub at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org

__attribute__((noinline, noclone)) int
foo (int x)
{
  if (x == '(' - 256 || x == '|' - 256 || x == '&' - 256 || x == 'n' - 256)
     return 1;
  return 0;
}

int
main ()
{
  if (foo ('n' - 256) != 1
      || foo ('(' - 256) != 1
      || foo ('|' - 256) != 1
      || foo ('&' - 256) != 1
      || foo ('q' - 256) != 0)
    __builtin_abort ();
  return 0;
}

is miscompiled at -O2 starting with r216393.

Reply via email to