| 1 |
/* { dg-additional-options "-fdump-tree-original -save-temps" } */ |
| 2 |
/* PR preprocessor/103165 */ |
| 3 |
|
| 4 |
#define inner(...) #__VA_ARGS__ ; _Pragma("omp error severity(warning) message (\"Test\") at(compilation)") |
| 5 |
#define outer(...) inner(__VA_ARGS__) |
| 6 |
|
| 7 |
void |
| 8 |
f (void) |
| 9 |
{ |
| 10 |
const char *str = outer(inner(1,2)); /* { dg-warning "'pragma omp error' encountered: Test" } */ |
| 11 |
} |
| 12 |
|
| 13 |
#if 0 |
| 14 |
After preprocessing, the expected result are the following three lines: |
| 15 |
const char *str = "\"1,2\" ; _Pragma(\"omp error severity(warning) message (\\\"Test\\\") at(compilation)\")" ; |
| 16 |
#pragma omp error severity(warning) message ("Test") at(compilation) |
| 17 |
; |
| 18 |
#endif |
| 19 |
|
| 20 |
/* { dg-final { scan-tree-dump "const char \\* str = \\(const char \\*\\) \"\\\\\"1,2\\\\\" ; _Pragma\\(\\\\\"omp error severity\\(warning\\) message \\(\\\\\\\\\\\\\"Test\\\\\\\\\\\\\"\\) at\\(compilation\\)\\\\\"\\)\";" "original" } } */ |