xref: /minix3/external/bsd/llvm/dist/clang/test/Headers/tgmath.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only -isystem %S/Inputs/include -verify %s
2*f4a2713aSLionel Sambuc // expected-no-diagnostics
3*f4a2713aSLionel Sambuc 
4*f4a2713aSLionel Sambuc #include <tgmath.h>
5*f4a2713aSLionel Sambuc 
6*f4a2713aSLionel Sambuc float f;
7*f4a2713aSLionel Sambuc double d;
8*f4a2713aSLionel Sambuc long double l;
9*f4a2713aSLionel Sambuc 
10*f4a2713aSLionel Sambuc float complex fc;
11*f4a2713aSLionel Sambuc double complex dc;
12*f4a2713aSLionel Sambuc long double complex lc;
13*f4a2713aSLionel Sambuc 
14*f4a2713aSLionel Sambuc // creal
15*f4a2713aSLionel Sambuc 
16*f4a2713aSLionel Sambuc _Static_assert(sizeof(creal(f)) == sizeof(f), "");
17*f4a2713aSLionel Sambuc _Static_assert(sizeof(creal(d)) == sizeof(d), "");
18*f4a2713aSLionel Sambuc _Static_assert(sizeof(creal(l)) == sizeof(l), "");
19*f4a2713aSLionel Sambuc 
20*f4a2713aSLionel Sambuc _Static_assert(sizeof(creal(fc)) == sizeof(f), "");
21*f4a2713aSLionel Sambuc _Static_assert(sizeof(creal(dc)) == sizeof(d), "");
22*f4a2713aSLionel Sambuc _Static_assert(sizeof(creal(lc)) == sizeof(l), "");
23*f4a2713aSLionel Sambuc 
24*f4a2713aSLionel Sambuc // fabs
25*f4a2713aSLionel Sambuc 
26*f4a2713aSLionel Sambuc _Static_assert(sizeof(fabs(f)) == sizeof(f), "");
27*f4a2713aSLionel Sambuc _Static_assert(sizeof(fabs(d)) == sizeof(d), "");
28*f4a2713aSLionel Sambuc _Static_assert(sizeof(fabs(l)) == sizeof(l), "");
29*f4a2713aSLionel Sambuc 
30*f4a2713aSLionel Sambuc _Static_assert(sizeof(fabs(fc)) == sizeof(f), "");
31*f4a2713aSLionel Sambuc _Static_assert(sizeof(fabs(dc)) == sizeof(d), "");
32*f4a2713aSLionel Sambuc _Static_assert(sizeof(fabs(lc)) == sizeof(l), "");
33*f4a2713aSLionel Sambuc 
34*f4a2713aSLionel Sambuc // logb
35*f4a2713aSLionel Sambuc 
36*f4a2713aSLionel Sambuc _Static_assert(sizeof(logb(f)) == sizeof(f), "");
37*f4a2713aSLionel Sambuc _Static_assert(sizeof(logb(d)) == sizeof(d), "");
38*f4a2713aSLionel Sambuc _Static_assert(sizeof(logb(l)) == sizeof(l), "");
39