testsuite/small/undef-2.c
raw| 1 | /* { dg-options "-DCE_EXTRACT_FUNCTIONS=g -DCE_NO_EXTERNALIZATION" }*/ |
| 2 | int x; |
| 3 | int yy; |
| 4 | |
| 5 | #define yy x |
| 6 | |
| 7 | int f(void) { |
| 8 | return yy; |
| 9 | } |
| 10 | |
| 11 | #undef yy |
| 12 | |
| 13 | int g(void) { |
| 14 | return yy; |
| 15 | } |
| 16 | |
| 17 | /* { dg-final { scan-tree-dump "int yy;" } } */ |
| 18 | /* { dg-final { scan-tree-dump "int g" } } */ |
| 19 | /* { dg-final { scan-tree-dump-not "int f" } } */ |
| 20 | /* { dg-final { scan-tree-dump-not "int x;" } } */ |