PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / pr59354.c
blobd479d00ceee43c8bb643367270e75341e003ad98
1 /* { dg-additional-options "-O3" } */
3 #include "tree-vect.h"
5 void abort (void);
7 unsigned int a[256];
8 unsigned char b[256];
10 __attribute__ ((noinline)) void
11 main1()
13 int i, z, x, y;
15 for(i = 0; i < 256; i++)
17 a[i] = i % 5;
18 __asm__ volatile ("");
21 for (z = 0; z < 16; z++)
22 for (y = 0; y < 4; y++)
23 for (x = 0; x < 4; x++)
24 b[y*64 + z*4 + x] = a[z*16 + y*4 + x];
26 if (b[4] != 1)
27 abort ();
30 int main (void)
32 check_vect ();
34 main1 ();
36 return 0;
39 /* { dg-final { scan-tree-dump "vectorized 1 loop" "vect" { target { vect_pack_trunc } } } } */