gcc/testsuite/gcc.dg/memcpy-1.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -fdump-tree-optimized" } */ |
| 3 | /* PR36598 AVR fail maybe due to cost metrics */ |
| 4 | /* { dg-final { scan-tree-dump-times "nasty_local\\." 0 "optimized" { xfail { "avr-*-*" } } } } */ |
| 5 | struct a {int a,b,c;} a; |
| 6 | int test(struct a a) |
| 7 | { |
| 8 | struct a nasty_local; |
| 9 | __builtin_memcpy (&nasty_local,&a, sizeof(a)); |
| 10 | return nasty_local.a; |
| 11 | } |