summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/complex.c
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-05-07 22:08:54 +0000
committerJohn McCall <rjmccall@apple.com>2010-05-07 22:08:54 +0000
commitb1fb0d3610d70b8a3a849b8652d5b46a9d1ce8fb (patch)
tree13763cd63579b21a19828572b627a1b0dd06886d /clang/test/CodeGen/complex.c
parent2ae3397536d6a9b858c50a119941c815d643f7dd (diff)
downloadbcm5719-llvm-b1fb0d3610d70b8a3a849b8652d5b46a9d1ce8fb.tar.gz
bcm5719-llvm-b1fb0d3610d70b8a3a849b8652d5b46a9d1ce8fb.zip
The FP constant evaluator was missing a few cases of unary operators that return floats
but whose operand isn't a float: specifically, __real__ and __imag__. Instead of filtering these out, just implement them. Fixes <rdar://problem/7958272>. llvm-svn: 103307
Diffstat (limited to 'clang/test/CodeGen/complex.c')
-rw-r--r--clang/test/CodeGen/complex.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/CodeGen/complex.c b/clang/test/CodeGen/complex.c
index ca606109f8b..055383ebbbe 100644
--- a/clang/test/CodeGen/complex.c
+++ b/clang/test/CodeGen/complex.c
@@ -89,3 +89,7 @@ void t6() {
--ci1;
}
+// <rdar://problem/7958272>
+double t7(double _Complex c) {
+ return __builtin_fabs(__real__(c));
+}
OpenPOWER on IntegriCloud