]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gdc.test/fail_compilation/ice1358.d
d: Import dmd b8384668f, druntime e6caaab9, phobos 5ab9ad256 (v2.098.0-beta.1)
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / fail_compilation / ice1358.d
CommitLineData
b4c522fa
IB
1/*
2TEST_OUTPUT:
3---
4fail_compilation/ice1358.d(29): Error: invalid UTF character \U80000000
5---
6*/
7
5fee5ec3
IB
8// https://issues.dlang.org/show_bug.cgi?id=1358
9// ICE(root.c) on Unicode codepoints greater than 0x7FFFFFFF
b4c522fa
IB
10/* 1358. Assertion failure: '0' on line 1548 in file '..\root\root.c'
11This one is trivial.
12PATCH(lexer.c, Lexer::escapeSequence()).
13--- lexer.c (revision 24)
14+++ lexer.c (working copy)
15@@ -1281,8 +1281,10 @@
16 break;
17 }
18 }
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;
25 }
26 else
27
28*/
29auto bla = "\U80000000";