OSDN Git Service

2005-05-03 David Billinghurst <David.Billinghurst@riotinto.com>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / vect / pr20122.c
1 /* { dg-require-effective-target vect_int } */
2
3 #include <stdarg.h>
4 #include "tree-vect.h"
5
6 typedef short ashort __attribute__ ((__aligned__(16)));
7 ashort Kernshort[24];
8 static void VecBug(ashort Kernel[8][24]) __attribute__((noinline));
9 static void VecBug(ashort Kernel[8][24]);
10
11 /* Doesn't occur of only inner-loop. */
12 static void VecBug(ashort Kernel[8][24])
13 {
14   int k,i;
15     for (k = 0; k<8; k++)
16         for (i = 0; i<24; i++)
17             Kernshort[i] = Kernel[k][i];
18 }
19
20 int main (int argc, char **argv)
21 {
22     check_vect ();
23
24     ashort Kernel[8][24];
25     int k,i;
26
27     for (k = 0; k<8; k++)
28         for (i = 0; i<24; i++)
29             Kernel[k][i] = 0;
30
31     VecBug(Kernel);
32
33     return 0;
34 }
35
36
37 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" } } */
38 /* { dg-final { cleanup-tree-dump "vect" } } */