]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/compilable/b12504.d
d: Import dmd b8384668f, druntime e6caaab9, phobos 5ab9ad256 (v2.098.0-beta.1)
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / compilable / b12504.d
1 // https://issues.dlang.org/show_bug.cgi?id=12504
2 void main()
3 {
4 {
5 int[0xFF + 1] sta;
6 foreach (ubyte i; 0 .. sta.length) {}
7 foreach (ubyte i, x; sta) {}
8 }
9 {
10 int[0x7F + 1] sta;
11 foreach (byte i; 0 .. sta.length) {}
12 foreach (byte i, x; sta) {}
13 }
14 {
15 int[0xFFFF + 1] sta;
16 foreach (ushort i; 0 .. sta.length) {}
17 foreach (ushort i, x; sta) {}
18 }
19 {
20 int[0x7FFF + 1] sta;
21 foreach (short i; 0 .. sta.length) {}
22 foreach (short i, x; sta) {}
23 }
24 {
25 immutable int[0xFF + 1] sta;
26 static foreach (ubyte i; 0 .. sta.length) {}
27 static foreach (ubyte i, x; sta) {}
28 }
29 {
30 immutable int[0x7F + 1] sta;
31 static foreach (byte i; 0 .. sta.length) {}
32 static foreach (byte i, x; sta) {}
33 }
34 {
35 immutable int[0xFFFF + 1] sta;
36 static foreach (ushort i; 0 .. sta.length) {}
37 static foreach (ushort i, x; sta) {}
38 }
39 {
40 immutable int[0x7FFF + 1] sta;
41 static foreach (short i; 0 .. sta.length) {}
42 static foreach (short i, x; sta) {}
43 }
44 }