r181531 - Add testcase missed from r181527.

Richard Smith richard-llvm at metafoo.co.uk
Thu May 9 11:33:51 PDT 2013


Author: rsmith
Date: Thu May  9 13:33:50 2013
New Revision: 181531

URL: http://llvm.org/viewvc/llvm-project?rev=181531&view=rev
Log:
Add testcase missed from r181527.

Added:
    cfe/trunk/test/Headers/tgmath.c

Added: cfe/trunk/test/Headers/tgmath.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Headers/tgmath.c?rev=181531&view=auto
==============================================================================
--- cfe/trunk/test/Headers/tgmath.c (added)
+++ cfe/trunk/test/Headers/tgmath.c Thu May  9 13:33:50 2013
@@ -0,0 +1,41 @@
+// RUN: %clang -fsyntax-only %s
+
+#ifdef __STDC_HOSTED__
+
+#include <tgmath.h>
+
+float f;
+double d;
+long double l;
+
+float complex fc;
+double complex dc;
+long double complex lc;
+
+// creal
+
+_Static_assert(sizeof(creal(f)) == sizeof(f), "");
+_Static_assert(sizeof(creal(d)) == sizeof(d), "");
+_Static_assert(sizeof(creal(l)) == sizeof(l), "");
+
+_Static_assert(sizeof(creal(fc)) == sizeof(f), "");
+_Static_assert(sizeof(creal(dc)) == sizeof(d), "");
+_Static_assert(sizeof(creal(lc)) == sizeof(l), "");
+
+// fabs
+
+_Static_assert(sizeof(fabs(f)) == sizeof(f), "");
+_Static_assert(sizeof(fabs(d)) == sizeof(d), "");
+_Static_assert(sizeof(fabs(l)) == sizeof(l), "");
+
+_Static_assert(sizeof(fabs(fc)) == sizeof(f), "");
+_Static_assert(sizeof(fabs(dc)) == sizeof(d), "");
+_Static_assert(sizeof(fabs(lc)) == sizeof(l), "");
+
+// logb
+
+_Static_assert(sizeof(logb(f)) == sizeof(f), "");
+_Static_assert(sizeof(logb(d)) == sizeof(d), "");
+_Static_assert(sizeof(logb(l)) == sizeof(l), "");
+
+#endif





More information about the cfe-commits mailing list