Warn pointer to signed integer cast for ilp32
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / gen-vect-28.c
blobabe07cae79ba4fa0ea92bdca40b378ed5ed67d40
1 /* { dg-do run { target vect_cmdline_needed } } */
2 /* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=4 -fdump-tree-vect-stats" } */
3 /* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=4 -fdump-tree-vect-stats -mno-sse" { target { i?86-*-* x86_64-*-* } } } */
5 #include <stdlib.h>
7 #define N 128
8 #define OFF 3
10 /* unaligned store. */
12 int main_1 (int off)
14 int i;
15 char ia[N+OFF];
17 for (i = 0; i < N; i++)
19 ia[i+off] = 5;
22 /* check results: */
23 for (i = 0; i < N; i++)
25 if (ia[i+off] != 5)
26 abort ();
29 return 0;
32 static volatile int off = 1;
34 int main (void)
36 return main_1 (off);
40 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { ! avr-*-* } } } } */
41 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { target { ! avr-*-* } } } } */
42 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target { ! avr-*-* } } } } */
43 /* { dg-final { cleanup-tree-dump "vect" } } */