Update concepts branch to revision 131834
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / no-trapping-math-2.c
blobcc3142efd68e3413bdc1065703c594b6fac8e31b
1 /* Test for pr30485. */
2 /* { dg-require-effective-target vect_float } */
4 #include <stdarg.h>
5 #include "tree-vect.h"
7 #define N 16
9 __attribute__ ((noinline)) int
10 main1 (void)
12 int i;
13 float a[N];
14 float b[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
16 /* Condition in loop. */
17 /* This loop is vectorized on platforms that support vect_condition. */
18 for (i = 0; i < N; i++)
20 a[i] = (b[i] > 0 ? b[i] : 0);
23 for (i = 0; i < N; i++)
25 if (a[i] != b[i])
26 abort ();
28 return 0;
31 int main (void)
33 check_vect ();
34 return main1 ();
37 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_condition } } } */
38 /* { dg-final { cleanup-tree-dump "vect" } } */