[llvm-bugs] [Bug 24585] New: Constant folding disagrees with GCC and FPU on result of 0./0.
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Aug 26 06:28:25 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=24585
Bug ID: 24585
Summary: Constant folding disagrees with GCC and FPU on result
of 0./0.
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Global Analyses
Assignee: unassignedbugs at nondot.org
Reporter: schaub.johannes at googlemail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
The following testcase outputs "1 -1" instead of the same value two times
#include <iostream>
#include <math.h>
int main() {
double zero = 0.0;
volatile double zerov = 0.0;
std::cout << copysign(1., zero/zero) << " " << copysign(1., zerov/zerov);
}
GCC outputs "-1 -1" (it has the sign bit set to 1).
--
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/20150826/e0609e78/attachment.html>
More information about the llvm-bugs
mailing list