[llvm-bugs] [Bug 37823] New: Loop miscompile
llvm-bugs at lists.llvm.org
Sun Jun 17 00:57:40 PDT 2018
Bug ID: 37823
Summary: Loop miscompile
OS: MacOS X
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: ks at claylabs.com
CC: llvm-bugs at lists.llvm.org
Created attachment 20434
Program to trigger bug in Clang
I've attached a relatively simple program that triggers a miscompile. The
program logic should be straight-forward. I'm fairly certain there is no
When compiling with -O2 or -O3, the wrong output is produced. The generated
program also triggers an error with valgrind.
When compiling the attached program with -O0, the correct output is produced,
and there are no errors with valgrind.
I've tested with LLVM 6.0 and also with Xcode 9.4.1. The OS is High Sierra.
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-bugs