testsuite/small/offsetof-1.c
raw| 1 | /* { dg-options "-DCE_EXTRACT_FUNCTIONS=f -DCE_NO_EXTERNALIZATION" }*/ |
| 2 | |
| 3 | struct Head { |
| 4 | int x; |
| 5 | int y; |
| 6 | }; |
| 7 | |
| 8 | unsigned long f() |
| 9 | { |
| 10 | return __builtin_offsetof(struct Head, y); |
| 11 | } |
| 12 | |
| 13 | /* { dg-final { scan-tree-dump "__builtin_offsetof" } } */ |
| 14 | /* { dg-final { scan-tree-dump "struct Head {" } } */ |