gcc/testsuite/gcc.dg/lto/embed-1_0.c
raw| 1 | /* { dg-lto-do run } */ |
| 2 | /* { dg-lto-options { { -std=c23 -flto } } } */ |
| 3 | |
| 4 | extern const unsigned char a[]; |
| 5 | extern const int asz; |
| 6 | |
| 7 | const unsigned char b[] = { |
| 8 | #embed "../../c-c++-common/cpp/embed-dir/magna-carta.txt" |
| 9 | }; |
| 10 | |
| 11 | int |
| 12 | main () |
| 13 | { |
| 14 | if (asz != sizeof (b) |
| 15 | || __builtin_memcmp (a, b, 256) |
| 16 | || a[256] != 42 |
| 17 | || __builtin_memcmp (a + 257, b + 257, asz - 257)) |
| 18 | __builtin_abort (); |
| 19 | } |