PR tree-optimization/48377
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / pr48377.c
blobe0cde43a777b23ccd9d2752285d5d7a28ca703de
1 /* PR tree-optimization/48377 */
2 /* { dg-do run } */
4 typedef unsigned int U __attribute__((__aligned__ (1), __may_alias__));
6 __attribute__((noinline, noclone)) unsigned int
7 foo (const char *s, int len)
9 const U *p = (const U *) s;
10 unsigned int f = len / sizeof (unsigned int), hash = len, i;
12 for (i = 0; i < f; ++i)
13 hash += *p++;
14 return hash;
17 char buf[64] __attribute__((aligned (32)));
19 int
20 main (void)
22 return foo (buf + 1, 26) != 26;
25 /* { dg-final { cleanup-tree-dump "vect" } } */