111
|
1 /* PR tree-optimization/48377 */
|
|
2 /* { dg-require-effective-target non_strict_align } */
|
|
3
|
|
4 #include "tree-vect.h"
|
|
5
|
|
6 typedef unsigned int U __attribute__((__aligned__ (1), __may_alias__));
|
|
7
|
|
8 __attribute__((noinline, noclone)) unsigned int
|
|
9 foo (const char *s, int len)
|
|
10 {
|
|
11 const U *p = (const U *) s;
|
|
12 unsigned int f = len / sizeof (unsigned int), hash = len, i;
|
|
13
|
|
14 for (i = 0; i < f; ++i)
|
|
15 hash += *p++;
|
|
16 return hash;
|
|
17 }
|
|
18
|
|
19 char buf[64] __attribute__((aligned (32)));
|
|
20
|
|
21 int
|
|
22 main (void)
|
|
23 {
|
|
24 check_vect ();
|
|
25 return foo (buf + 1, 26) != 26;
|
|
26 }
|
|
27
|