]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/compilable/test19519.d
d: Import dmd b8384668f, druntime e6caaab9, phobos 5ab9ad256 (v2.098.0-beta.1)
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / compilable / test19519.d
1 struct S { char[1] e = void; }
2
3 void init(ref char[1] e)
4 {
5 e[0 .. 1] = "A";
6 }
7
8 int foo()
9 {
10 auto s = S();
11 init(s.e);
12 return __ctfe;
13 }
14
15 static assert(foo() == 1);