3 /* { dg-options "-O3 -std=c99" } */
7 extern void abort (void);
13 #define SET_VEC(size, type) void set_vector_##size (pRINT##size a) \
17 a[i] = (type##_MIN) + (i + 1); \
20 #define SET_RVEC(size, type) void set_rvector_##size (pRINT##size a) \
24 a[i] = type##_MAX - i; \
27 #define CHECK_VEC(size) void check_vector_##size (pRINT##size a, \
43 set_rvector_long (pRLONG a
)
47 a
[i
] = (LONG_MAX
) - i
;
56 set_vector_long (long *__restrict__ a
)
60 a
[i
] = (LONG_MIN
) + i
+ 1;
69 check_vector_long (long *__restrict__ a
, long *__restrict__ b
)
84 /* abs () from stdlib. */
93 /* abs () from stdlib. */
96 signed char abs_vector_8
[N
];
97 short abs_vector_16
[N
];
99 long long abs_vector_64
[N
];
100 long abs_vector_long
[N
];
102 /* Set up result vectors. */
103 set_rvector_8 (abs_vector_8
);
104 set_rvector_16 (abs_vector_16
);
105 set_rvector_32 (abs_vector_32
);
106 set_rvector_long (abs_vector_long
);
107 set_rvector_64 (abs_vector_64
);
114 set_vector_long (blibl
);
116 /* Calculate their absolute values. */
117 absolute_s8 (a8
, b8
);
118 absolute_s16 (a16
, b16
);
119 absolute_s32 (a32
, b32
);
120 absolute_s64 (a64
, b64
);
121 /* abs () from stdlib. */
122 absolute_s32_lib (alib32
, b32
);
123 absolute_l32_lib (alibl
, blibl
);
126 check_vector_8 (a8
, abs_vector_8
);
127 check_vector_16 (a16
, abs_vector_16
);
128 check_vector_32 (a32
, abs_vector_32
);
129 check_vector_64 (a64
, abs_vector_64
);
130 check_vector_32 (alib32
, abs_vector_32
);
131 check_vector_long (alibl
, abs_vector_long
);