From b1fb0d3610d70b8a3a849b8652d5b46a9d1ce8fb Mon Sep 17 00:00:00 2001 From: John McCall Date: Fri, 7 May 2010 22:08:54 +0000 Subject: 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 . llvm-svn: 103307 --- clang/test/CodeGen/complex.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'clang/test/CodeGen/complex.c') 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; } +// +double t7(double _Complex c) { + return __builtin_fabs(__real__(c)); +} -- cgit v1.2.3