PR target/55146
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-intfloat-conversion-2.c
blob87f200119d6c487be9e732307311e92e215fa185
1 /* { dg-require-effective-target vect_float } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 32
8 int int_arr[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
9 float float_arr[N];
10 char char_arr[N];
12 __attribute__ ((noinline)) int main1 ()
14 int i;
16 for (i = 0; i < N; i++){
17 float_arr[i] = (float) int_arr[i];
18 char_arr[i] = 0;
21 /* check results: */
22 for (i = 0; i < N; i++)
24 if (float_arr[i] != (float) int_arr[i])
25 abort ();
26 if (char_arr[i] != 0)
27 abort ();
30 return 0;
33 int main (void)
35 check_vect ();
37 return main1 ();
40 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_intfloat_cvt } } } */
41 /* { dg-final { cleanup-tree-dump "vect" } } */