aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vect/pr20122.c
blob: ff6ec75e5abb0471dad4661956fe950396663c76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* { dg-require-effective-target vect_int } */

#include <stdarg.h>
#include "tree-vect.h"

typedef short ashort __attribute__ ((__aligned__(16)));
ashort Kernshort[24];
static void VecBug(ashort Kernel[8][24]) __attribute__((noinline));
static void VecBug(ashort Kernel[8][24]);

/* Doesn't occur of only inner-loop. */
static void VecBug(ashort Kernel[8][24])
{
  int k,i;
    for (k = 0; k<8; k++)
        for (i = 0; i<24; i++)
            Kernshort[i] = Kernel[k][i];
}

int main (int argc, char **argv)
{
    check_vect ();

    ashort Kernel[8][24];
    int k,i;

    for (k = 0; k<8; k++)
        for (i = 0; i<24; i++)
            Kernel[k][i] = 0;

    VecBug(Kernel);

    return 0;
}


/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" } } */