[llvm-bugs] [Bug 32398] New: std::exp() produces infinite loop on Windows with -Ofast
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Mar 23 13:17:10 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=32398
Bug ID: 32398
Summary: std::exp() produces infinite loop on Windows with
-Ofast
Product: new-bugs
Version: trunk
Hardware: PC
OS: Windows XP
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: techmeology at techmeology.co.uk
CC: llvm-bugs at lists.llvm.org
Created attachment 18159
--> https://bugs.llvm.org/attachment.cgi?id=18159&action=edit
Demonstration of the bug
When cross compiling for Windows (I haven't tested native compile on Windows),
std::exp() is miscompiled as an infinite loop if -Ofast is used. exp() works
correctly, and std::exp() works correctly on Linux.
Clang version: 297935 (Also tried a 4.0.0 pre-release with similar results)
OS: Arch Linux
Steps to reproduce: see build.sh in the tarball
Expected result: No infinite loop should be produced.
Actual result: The produced IR has a branch to a branch to itself (i.e: an
infinite loop).
Contents of the tarball:
build.sh
Shows how I produced all the files in the out directory.
exp.cpp
A minimal reproducer that demonstrates the bug.
out/windows_ofast/exp_expanded.cpp
The preprocessed version of exp.cpp on my system for -Ofast on Windows
out/windows_ofast/exp.bc
The generated IR bitcode for exp.cpp
The remaining files are analogous for -O3 and for native build.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170323/f50e3bf5/attachment.html>
More information about the llvm-bugs
mailing list