https://llvm.org/bugs/show_bug.cgi?id=27712
Bug ID: 27712 Summary: wrong code bug Product: new-bugs Version: trunk Hardware: PC OS: All Status: NEW Severity: normal Priority: P Component: new bugs Assignee: unassignedb...@nondot.org Reporter: reg...@cs.utah.edu CC: llvm-bugs@lists.llvm.org Classification: Unclassified Sorry for the sucky test case, this is the best C-Reduce could do... Johns-MacBook-Pro-2:reduce_wrong_719369 regehr$ clang -O0 small.c -w ; ./a.out 2 Johns-MacBook-Pro-2:reduce_wrong_719369 regehr$ gcc -O small.c -w ; ./a.out 2 Johns-MacBook-Pro-2:reduce_wrong_719369 regehr$ clang -O small.c -w ; ./a.out 0 Johns-MacBook-Pro-2:reduce_wrong_719369 regehr$ cat small.c int printf(const char *, ...); int a; int b[3]; short c; char d; int main() { { char e; unsigned f; b[2] = d = 137; b[0] = d; lbl_1154: for (;; a++) if (b[a]) break; e = b[0] < 0 ?: 2 << b[0]; f = e; c = f < 2; if (c) { b[0] = 0; goto lbl_1154; } } printf("%d\n", a); return 0; } Johns-MacBook-Pro-2:reduce_wrong_719369 regehr$ clang -v clang version 3.9.0 (trunk 269180) Target: x86_64-apple-darwin15.4.0 Thread model: posix InstalledDir: /Users/regehr/llvm-install/bin -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs