testsuite/small/record-5.c
raw| 1 | /* { dg-options "-DCE_EXTRACT_FUNCTIONS=f -DCE_NO_EXTERNALIZATION" }*/ |
| 2 | |
| 3 | #define SMP_CACHE_BYTES 4 |
| 4 | #define ____cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES))) |
| 5 | |
| 6 | struct sched_avg { |
| 7 | int aa; |
| 8 | } ____cacheline_aligned; |
| 9 | |
| 10 | struct sched_avg sa; |
| 11 | |
| 12 | int f(void) |
| 13 | { |
| 14 | return sa.aa; |
| 15 | } |
| 16 | |
| 17 | /* { dg-final { scan-tree-dump "struct sched_avg {\n *int aa;\n} *____cacheline_aligned;" } } */ |