Update concepts branch to revision 131834
[official-gcc.git] / gcc / testsuite / gcc.dg / pragma-push_macro-1.c
blobac5d059b5ea1c79c97d036311eedb55ac883395f
1 /* Prove that HANDLE_PRAGMA_PUSH_POP_MACRO handling works somewhat. */
3 /* { dg-do link { target *-*-mingw* } } */
5 #define TEXT1 "ABC"
6 #define TEXT2 "DEF"
8 int main()
10 if (__builtin_strcmp (TEXT1 TEXT2, "ABCDEF") != 0)
11 link_error ();
13 #pragma push_macro("TEXT1")
14 #undef TEXT1
15 #define TEXT1 "XYZ"
17 if (__builtin_strcmp (TEXT1 TEXT2, "XYZDEF") != 0)
18 link_error ();
20 #pragma pop_macro("TEXT1")
22 if (__builtin_strcmp (TEXT1 TEXT2, "ABCDEF") != 0)
23 link_error ();
25 return 0;