* gcc.target/i386/pr66648.c: Move to correct place.
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr66648.c
blob88c126fff8c006905e2fb43c01c551be73db3b86
1 /* { dg-do run } */
2 /* { dg-options "-O2 -mstringop-strategy=unrolled_loop -mtune=nocona" } */
4 #define PATTERN 0xdeadbeef
5 #define SIZE 32
7 struct S { int i; char str[SIZE]; int j; };
9 void __attribute__((noclone, noinline))
10 my_memcpy (char *, const char *, unsigned int);
12 void
13 my_memcpy (char *dst, const char *src, unsigned int len)
15 if (len < 8)
16 __builtin_abort ();
18 __builtin_memcpy (dst, src, len);
21 int
22 main (void)
24 const char str[SIZE]= "1234567890123456789012345678901";
25 struct S *s = __builtin_malloc (sizeof (struct S));
27 s->j = PATTERN;
28 my_memcpy (s->str, str, SIZE);
29 if (s->j != PATTERN)
30 __builtin_abort ();
32 return 0;