[llvm-bugs] [Bug 32398] New: std::exp() produces infinite loop on Windows with -Ofast
llvm-bugs at lists.llvm.org
Thu Mar 23 13:17:10 PDT 2017
Bug ID: 32398
Summary: std::exp() produces infinite loop on Windows with
OS: Windows XP
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: techmeology at techmeology.co.uk
CC: llvm-bugs at lists.llvm.org
Created attachment 18159
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
Contents of the tarball:
Shows how I produced all the files in the out directory.
A minimal reproducer that demonstrates the bug.
The preprocessed version of exp.cpp on my system for -Ofast on Windows
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...
More information about the llvm-bugs