| 1 |
/* PR libstdc++/88101 */ |
| 2 |
/* { dg-do run } */ |
| 3 |
/* { dg-require-effective-target size20plus } */ |
| 4 |
|
| 5 |
typedef int T __attribute__((aligned (16384))); |
| 6 |
struct S { char a; short b; long double c; T d; T e; long long f; }; |
| 7 |
|
| 8 |
__attribute__((noipa)) void |
| 9 |
foo (struct S *s) |
| 10 |
{ |
| 11 |
s->a = -1; s->b = -1; s->c = -18.52L; s->d = -1; s->e = -1; s->f = -1; |
| 12 |
} |
| 13 |
|
| 14 |
int |
| 15 |
main () |
| 16 |
{ |
| 17 |
struct S s1, s2; |
| 18 |
__builtin_memset (&s1, 0, sizeof (s1)); |
| 19 |
__builtin_memset (&s2, -1, sizeof (s2)); |
| 20 |
foo (&s1); |
| 21 |
foo (&s2); |
| 22 |
__builtin_clear_padding (&s2); |
| 23 |
if (__builtin_memcmp (&s1, &s2, sizeof (s1))) |
| 24 |
__builtin_abort (); |
| 25 |
return 0; |
| 26 |
} |