d: Merge upstream dmd, druntime 4c18eed967, phobos d945686a4.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / ice1358.d
blob2c334f95ca2174696577c80f92b65ff8eacb4fb8
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/ice1358.d(29): Error: invalid UTF character \U80000000
5 ---
6 */
8 // https://issues.dlang.org/show_bug.cgi?id=1358
9 // ICE(root.c) on Unicode codepoints greater than 0x7FFFFFFF
10 /* 1358. Assertion failure: '0' on line 1548 in file '..\root\root.c'
11 This one is trivial.
12 PATCH(lexer.c, Lexer::escapeSequence()).
13 --- lexer.c (revision 24)
14 +++ lexer.c (working copy)
15 @@ -1281,8 +1281,10 @@
16 break;
19 - if (ndigits != 2 && !utf_isValidDchar(v))
20 + if (ndigits != 2 && !utf_isValidDchar(v)) {
21 error("invalid UTF character \\U%08x", v);
22 + v = 0; // prevent ICE
23 + }
24 c = v;
26 else
29 auto bla = "\U80000000";