https://llvm.org/bugs/show_bug.cgi?id=25649
Bug ID: 25649 Summary: Wrong constant folding Product: clang Version: trunk Hardware: PC OS: MacOS X Status: NEW Severity: normal Priority: P Component: LLVM Codegen Assignee: unassignedclangb...@nondot.org Reporter: ishiura-compi...@ml.kwansei.ac.jp CC: llvm-bugs@lists.llvm.org Classification: Unclassified LLVM + clang-3.8 miscompiles the following code. $ cat error.c int a = 0; long long b = 1LL; long long c = 3LL; volatile unsigned int d = 0U; int f = 0; int main ( void ) { int e = 6 / ((unsigned int)b * (3LL * (3 * c == 9)) << (1 ^ a || d >= 0)); if ( e != 1 ) { f = e; __builtin_abort(); } return 0; } $ clang-3.8 error.c -m32 -w -O3 $ ./a.out zsh: abort ./a.out $ clang-3.8 -v clang version 3.8.0 (trunk 254118) Target: x86_64-apple-darwin14.5.0 Thread model: posix InstalledDir: /Users/home/clang/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