testsuite/small/typedef-8.c
raw| 1 | /* { dg-options "-DCE_EXTRACT_FUNCTIONS=f -DCE_NO_EXTERNALIZATION" }*/ |
| 2 | |
| 3 | typedef struct { |
| 4 | int x; |
| 5 | } A; |
| 6 | |
| 7 | typedef struct { |
| 8 | A a; |
| 9 | int y; |
| 10 | } B; |
| 11 | |
| 12 | int f() |
| 13 | { |
| 14 | return __builtin_offsetof(B, y); |
| 15 | } |
| 16 | |
| 17 | /* { dg-final { scan-tree-dump "typedef struct {\n *int x;\n} A;" } } */ |
| 18 | /* { dg-final { scan-tree-dump "typedef struct {\n *A a;\n *int y;\n} B;" } } */ |
| 19 | /* { dg-final { scan-tree-dump "int f" } } */ |