Merged with mainline at revision 128810.
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / pr31699.c
blobcbc596d467f0467c6baeb0c69e5a5f2c6a683904
1 /* { dg-require-effective-target vect_double } */
3 #include <stdlib.h>
4 #include <stdarg.h>
5 #include "tree-vect.h"
7 float x[256];
9 void foo(void)
11 double *z = malloc (sizeof(double) * 256);
13 int i;
14 for (i=0; i<256; ++i)
15 z[i] = x[i] + 1.0f;
19 int main()
21 int i;
23 check_vect ();
25 for (i = 0; i < 256; i++)
26 x[i] = (float) i;
28 foo();
30 return 0;
33 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_intfloat_cvt } } } */
34 /* { dg-final { scan-tree-dump-times "vector alignment may not be reachable" 1 "vect" { target { ! vector_alignment_reachable } } } } */
35 /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { ! vector_alignment_reachable } } } } */
36 /* { dg-final { cleanup-tree-dump "vect" } } */