| 1 |
/* PR preprocessor/57824 */ |
| 2 |
/* { dg-do run { target { c || c++11 } } } */ |
| 3 |
/* { dg-options "-std=gnu99" { target c } } */ |
| 4 |
|
| 5 |
#define S(s) s |
| 6 |
#define T(s) s "\n" |
| 7 |
|
| 8 |
const char x[] = R"( |
| 9 |
abc |
| 10 |
)"; |
| 11 |
const char y[] = S(R"( |
| 12 |
abc |
| 13 |
)"); |
| 14 |
const char z[] = "\nabc\n"; |
| 15 |
const char w[] = T(R"( |
| 16 |
abc)"); |
| 17 |
|
| 18 |
int |
| 19 |
main () |
| 20 |
{ |
| 21 |
if (sizeof x != sizeof y |
| 22 |
|| sizeof x != sizeof z |
| 23 |
|| sizeof x != sizeof w |
| 24 |
|| __builtin_memcmp (x, y, sizeof x) |
| 25 |
|| __builtin_memcmp (x, z, sizeof x) |
| 26 |
|| __builtin_memcmp (x, w, sizeof x)) |
| 27 |
__builtin_abort (); |
| 28 |
return 0; |
| 29 |
} |