LWG 3035. std::allocator's constructors should be constexpr
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-cond-7.c
blobbd2947516584bf0039d91589422acefd0d27cc35
1 #include "tree-vect.h"
3 extern void abort (void);
4 double ad[64], bd[64], cd[64], dd[64], ed[64];
5 float af[64], bf[64], cf[64], df[64], ef[64];
6 signed char ac[64], bc[64], cc[64], dc[64], ec[64];
7 short as[64], bs[64], cs[64], ds[64], es[64];
8 int ai[64], bi[64], ci[64], di[64], ei[64];
9 long long all[64], bll[64], cll[64], dll[64], ell[64];
10 unsigned char auc[64], buc[64], cuc[64], duc[64], euc[64];
11 unsigned short aus[64], bus[64], cus[64], dus[64], eus[64];
12 unsigned int au[64], bu[64], cu[64], du[64], eu[64];
13 unsigned long long aull[64], bull[64], cull[64], dull[64], eull[64];
15 #define F(var) \
16 __attribute__((noinline, noclone)) void \
17 f##var (void) \
18 { \
19 int i; \
20 for (i = 0; i < 64; i++) \
21 { \
22 __typeof (a##var[0]) d = d##var[i], e = e##var[i]; \
23 a##var[i] = b##var[i] > c##var[i] ? d : e; \
24 } \
27 #define TESTS \
28 F (d) F (f) F (c) F (s) F (i) F (ll) F (uc) F (us) F (u) F (ull)
30 TESTS
32 int
33 main ()
35 int i;
37 check_vect ();
38 for (i = 0; i < 64; i++)
40 #undef F
41 #define F(var) \
42 b##var[i] = i + 64; \
43 switch (i % 3) \
44 { \
45 case 0: c##var[i] = i + 64; break; \
46 case 1: c##var[i] = 127 - i; break; \
47 case 2: c##var[i] = i; break; \
48 } \
49 d##var[i] = i / 2; \
50 e##var[i] = i * 2;
51 TESTS
53 #undef F
54 #define F(var) f##var ();
55 TESTS
56 for (i = 0; i < 64; i++)
58 asm volatile ("" : : : "memory");
59 #undef F
60 #define F(var) \
61 if (a##var[i] != (b##var[i] > c##var[i] ? d##var[i] : e##var[i])) \
62 abort ();
63 TESTS
65 return 0;