Fix ICE in substring-handling building 502.gcc_r (PR 87562)
[official-gcc.git] / gcc / testsuite / c-c++-common / raw-string-17.c
blob30df020082e40837107af792c14287e4b500f31a
1 /* PR preprocessor/57824 */
2 /* { dg-do run } */
3 /* { dg-options "-std=gnu99" { target c } } */
4 /* { dg-options "-std=c++11" { target c++ } } */
6 #define S(s) s
7 #define T(s) s "\n"
9 const char x[] = R"(
10 abc
11 )";
12 const char y[] = S(R"(
13 abc
14 )");
15 const char z[] = "\nabc\n";
16 const char w[] = T(R"(
17 abc)");
19 int
20 main ()
22 if (sizeof x != sizeof y
23 || sizeof x != sizeof z
24 || sizeof x != sizeof w
25 || __builtin_memcmp (x, y, sizeof x)
26 || __builtin_memcmp (x, z, sizeof x)
27 || __builtin_memcmp (x, w, sizeof x))
28 __builtin_abort ();
29 return 0;