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>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103307 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/complex.c b/test/CodeGen/complex.c
index ca60610..055383e 100644
--- a/test/CodeGen/complex.c
+++ b/test/CodeGen/complex.c
@@ -89,3 +89,7 @@
--ci1;
}
+// <rdar://problem/7958272>
+double t7(double _Complex c) {
+ return __builtin_fabs(__real__(c));
+}