https://bugs.llvm.org/show_bug.cgi?id=37823
Bug ID: 37823
Summary: Loop miscompile
Product: clang
Version: 6.0
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangb...@nondot.org
Reporter: k...@claylabs.com
CC: llvm-bugs@lists.llvm.org
Created attachment 20434
--> https://bugs.llvm.org/attachment.cgi?id=20434&action=edit
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
undefined behavior.
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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs