diff options
author | dim <dim@FreeBSD.org> | 2013-12-22 00:07:40 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-12-22 00:07:40 +0000 |
commit | 952eddef9aff85b1e92626e89baaf7a360e2ac85 (patch) | |
tree | df8df0b0067b381eab470a3b8f28d14a552a6340 /test/Headers/tgmath.c | |
parent | ea266cad53e3d49771fa38103913d3ec7a166694 (diff) | |
download | FreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.zip FreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.tar.gz |
Vendor import of clang release_34 branch r197841 (effectively, 3.4 RC3):
https://llvm.org/svn/llvm-project/cfe/branches/release_34@197841
Diffstat (limited to 'test/Headers/tgmath.c')
-rw-r--r-- | test/Headers/tgmath.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/test/Headers/tgmath.c b/test/Headers/tgmath.c new file mode 100644 index 0000000..4235ae2 --- /dev/null +++ b/test/Headers/tgmath.c @@ -0,0 +1,38 @@ +// RUN: %clang_cc1 -fsyntax-only -isystem %S/Inputs/include -verify %s +// expected-no-diagnostics + +#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), ""); |