]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/pr19402-2.c
replace ISL with isl
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / pr19402-2.c
CommitLineData
17684d46
RG
1/* { dg-do run } */
2/* { dg-options "-fno-inline -Os" } */
3
4void abort(void);
5
6
7float powif(float x, int n)
8{
9 return __builtin_powif(x, n);
10}
11
12double powi(double x, int n)
13{
14 return __builtin_powi(x, n);
15}
16
17long double powil(long double x, int n)
18{
19 return __builtin_powil(x, n);
20}
21
22
23float powcif(float x)
24{
25 return __builtin_powif(x, 5);
26}
27
28double powci(double x)
29{
30 return __builtin_powi(x, 5);
31}
32
33long double powcil(long double x)
34{
35 return __builtin_powil(x, 5);
36}
37
38
39float powicf(int n)
40{
41 return __builtin_powif(2.0, n);
42}
43
44double powic(int n)
45{
46 return __builtin_powi(2.0, n);
47}
48
49long double powicl(int n)
50{
51 return __builtin_powil(2.0, n);
52}
53
54
55int main()
56{
57 if (__builtin_powi(1.0, 5) != 1.0)
58 abort();
59 if (__builtin_powif(1.0, 5) != 1.0)
60 abort();
61 if (__builtin_powil(1.0, 5) != 1.0)
62 abort();
63 if (powci(1.0) != 1.0)
64 abort();
65 if (powcif(1.0) != 1.0)
66 abort();
67 if (powcil(1.0) != 1.0)
68 abort();
69 if (powi(1.0, -5) != 1.0)
70 abort();
71 if (powif(1.0, -5) != 1.0)
72 abort();
73 if (powil(1.0, -5) != 1.0)
74 abort();
75 if (powic(1) != 2.0)
76 abort();
77 if (powicf(1) != 2.0)
78 abort();
79 if (powicl(1) != 2.0)
80 abort();
81 return 0;
82}