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