| 1 |
// { dg-do preprocess } |
| 2 |
// { dg-additional-options -fmodule-header } |
| 3 |
|
| 4 |
#define frob FROB |
| 5 |
|
| 6 |
// this should be translated, if it isn't the above #define will break |
| 7 |
// us |
| 8 |
MARK1 __LINE__ |
| 9 |
#include "legacy-3_a.H" |
| 10 |
MARK2 __LINE__ |
| 11 |
int move (int X = __LINE__); // Capture __LINE__ in a non-definition |
| 12 |
// this should also be translated, but elided too |
| 13 |
MARK2 __LINE__ |
| 14 |
#include "legacy-3_a.H" |
| 15 |
MARK3 __LINE__ |
| 16 |
|
| 17 |
// this should not be translated |
| 18 |
#include "legacy-3.h" |
| 19 |
|
| 20 |
// { dg-final { scan-file legacy-3_c.i {MARK1 8\nimport "[^\n]*legacy-3_a.H" \[\[__translated\]\];\nMARK2 10\n} } } |
| 21 |
// We should have stopped. |
| 22 |
// { dg-final { scan-file legacy-3_c.i {move} } } |
| 23 |
// { dg-final { scan-file legacy-3_c.i {MARK2 13\n\nMARK3 15\n} } } |
| 24 |
// { dg-final { scan-file-not legacy-3_c.i {# [^\n]*legacy-3_a.H} } } |
| 25 |
// { dg-final { scan-file legacy-3_c.i {# [^\n]*legacy-3.h} } } |