(root)/
gcc-13.2.0/
gcc/
testsuite/
c-c++-common/
gomp/
pragma-5.c
       1  /* { dg-additional-options "-fdump-tree-original" }  */
       2  /* PR preprocessor/103165  */
       3  
       4  #define inner(...) #__VA_ARGS__ ; _Pragma   (	"   omp		error severity   (warning)	message (\"Test\") at(compilation)" ) /* { dg-line inner_location } */
       5  #define outer(...) inner(__VA_ARGS__) /* { dg-line outer_location } */
       6  
       7  void
       8  f (void)
       9  {
      10    const char *str = outer(inner(1,2)); /* { dg-line str_location } */
      11    /* { dg-warning "35:'pragma omp error' encountered: Test" "" { target *-*-* } inner_location }
      12       { dg-note "20:in expansion of macro 'inner'" "" { target *-*-* } outer_location }
      13       { dg-note "21:in expansion of macro 'outer'" "" { target *-*-* } str_location } */
      14  }
      15  
      16  #if 0
      17  After preprocessing, the expected result are the following three lines:
      18       const char *str = "\"1,2\" ; _Pragma ( \"   omp		error severity   (warning)	message (\\\"Test\\\") at(compilation)\" )" ;
      19  #pragma omp error severity(warning) message ("Test") at(compilation)
      20                                       ;
      21  #endif
      22  
      23  /* { dg-final { scan-tree-dump "const char \\* str = \\(const char \\*\\) \"\\\\\"1,2\\\\\" ; _Pragma \\( \\\\\"   omp\\\\t\\\\terror severity   \\(warning\\)\\\\tmessage \\(\\\\\\\\\\\\\"Test\\\\\\\\\\\\\"\\) at\\(compilation\\)\\\\\" \\)\";" "original" } }  */