[LLVMbugs] [Bug 19144] New: Bad code generation at "-O0" and "double" values
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Mar 14 13:17:26 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=19144
Bug ID: 19144
Summary: Bad code generation at "-O0" and "double" values
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Backend: PowerPC
Assignee: unassignedbugs at nondot.org
Reporter: nenad at intrepid.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
The following test code fails when compiled with -O0.
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
int x = 1;
int q = 1;
double y = 7.0;
double foo() {
double d = x + y + q;
return d;
}
int main(void) {
double b = foo();
if (b != 9.0) {
printf("FAILED (result = %g but expect 9.0)\n", b);
} else {
printf("SUCCESS\n");
}
}
If "double" is replaced with "float" it works. -O1 and up have no problems.
--
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/20140314/522f8947/attachment.html>
More information about the llvm-bugs
mailing list