2018-01-16 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / fast-math-vect-reduc-9.c
blob0e9440caa9c0353378a4f3b75b3f5233e3b7a2db
1 /* { dg-require-effective-target vect_float } */
3 #include "tree-vect.h"
5 float x[1024];
6 float
7 test (void)
9 int i;
10 float gosa = 0.0;
11 for (i = 0; i < 1024; ++i)
13 float tem = x[i];
14 gosa += tem * tem;
16 return gosa;
19 int main (void)
21 check_vect ();
23 if (test () != 0.0)
24 abort ();
26 return 0;
29 /* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" } } */