| 1 |
/* { dg-do run } */ |
| 2 |
/* { dg-options "-O2 -save-temps" } */ |
| 3 |
|
| 4 |
#include <string.h> |
| 5 |
|
| 6 |
char src[16] __attribute__ ((aligned(8))) = "abcdefghijklmnop"; |
| 7 |
char dest[16] __attribute__ ((aligned(8))) = { 0 }; |
| 8 |
|
| 9 |
void __attribute__ ((noinline,noclone)) |
| 10 |
aligned_both (void) |
| 11 |
{ |
| 12 |
memcpy (dest, src, 16); |
| 13 |
} |
| 14 |
|
| 15 |
int main () |
| 16 |
{ |
| 17 |
int i; |
| 18 |
aligned_both (); |
| 19 |
for (i = 0; i < 16; i++) |
| 20 |
if (dest[i] != src[i]) |
| 21 |
__builtin_abort (); |
| 22 |
return 0; |
| 23 |
} |
| 24 |
|
| 25 |
/* There should be no 'unaligned' comments. */ |
| 26 |
/* { dg-final { scan-assembler-not "@ unaligned" } } */ |