2018-01-16 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / pr48377.c
bloba526de9769022648d91ab5ffc79ea9c05edd5e66
1 /* PR tree-optimization/48377 */
2 /* { dg-require-effective-target non_strict_align } */
4 #include "tree-vect.h"
6 typedef unsigned int U __attribute__((__aligned__ (1), __may_alias__));
8 __attribute__((noinline, noclone)) unsigned int
9 foo (const char *s, int len)
11 const U *p = (const U *) s;
12 unsigned int f = len / sizeof (unsigned int), hash = len, i;
14 for (i = 0; i < f; ++i)
15 hash += *p++;
16 return hash;
19 char buf[64] __attribute__((aligned (32)));
21 int
22 main (void)
24 check_vect ();
25 return foo (buf + 1, 26) != 26;