testsuite/small/record-1.c
raw| 1 | /* { dg-options "-DCE_EXTRACT_FUNCTIONS=Get_X -DCE_NO_EXTERNALIZATION" }*/ |
| 2 | struct Point; |
| 3 | |
| 4 | struct Point |
| 5 | { |
| 6 | int x, y; |
| 7 | }; |
| 8 | |
| 9 | int Get_X(struct Point *p) |
| 10 | { |
| 11 | return p->x; |
| 12 | } |
| 13 | |
| 14 | int getX(struct Point p) |
| 15 | { |
| 16 | return p.x; |
| 17 | } |
| 18 | |
| 19 | /* { dg-final { scan-tree-dump "struct Point\n{\n *int x, y;\n};" } } */ |
| 20 | /* { dg-final { scan-tree-dump "int Get_X" } } */ |
| 21 | /* { dg-final { scan-tree-dump-not "int getX" } } */ |