https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88792
Bug ID: 88792 Summary: [9 Regression] wrong-code in RPO VN since r263875 Product: gcc Version: 9.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org CC: rguenth at gcc dot gnu.org Target Milestone: --- Isolated from vim package: $ cat r.c int one = 1; char __attribute__((noipa)) foo(char v) { int modec; if (one) { modec = ((v < 'A' || v > 'Z') ? v : v + ('a' - 'A')); if (modec != 't' && modec != 'c' && modec != 'g') modec = 0; } else modec = 'g'; return modec; } int main(int argc, char **argv) { char c = 't'; int r = foo (c); __builtin_printf ("called for '%c', returned: %c\n", c, r); if (r != c) __builtin_abort (); return 0; } $ gcc -O2 r.c -O2 && ./a.out called for 't', returned: Aborted (core dumped)