| 1 |
/* PR tree-optimization/112924 */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* { dg-options "-O2 -w" } */ |
| 4 |
/* { dg-additional-options "-msse2" { target i?86-*-* x86_64-*-* } } */ |
| 5 |
|
| 6 |
struct S { long a; char b[64]; }; |
| 7 |
void foo (struct S a); |
| 8 |
char c; |
| 9 |
int d[3541]; |
| 10 |
|
| 11 |
static void |
| 12 |
bar (struct S *s, char *p) |
| 13 |
{ |
| 14 |
unsigned int a = sizeof (d) - sizeof (int) - s->a; |
| 15 |
long c = __builtin_object_size (s, 0); |
| 16 |
for (; a >= 64; a -= 64, p += 4); |
| 17 |
__builtin___memcpy_chk (s, p, a, c); |
| 18 |
} |
| 19 |
|
| 20 |
void |
| 21 |
baz (void) |
| 22 |
{ |
| 23 |
struct S s = {}; |
| 24 |
bar (&s, &c); |
| 25 |
foo (s); |
| 26 |
} |