Debian Codegraph @

gcc/testsuite/gdc.test/runnable/test23710.d

raw
1 // https://issues.dlang.org/show_bug.cgi?id=23710
2
3 int test(int i)
4 {
5 int j;
6 int[] foo;
7 if (0)
8 {
9 for (;;)
10 {
11 import core.stdc.stdio;
12 printf("start body\n");
13 foo = foo ~ [1,2,3];
14 L1:
15 printf("foo.length = %zu\n", foo.length);
16 j += foo.length;
17 i += 2;
18 if (i > 5)
19 return j;
20 printf("end body\n");
21 }
22 }
23 goto L1;
24 }
25
26 int main()
27 {
28 assert(test(1) == 0 + 3 + 6);
29 return 0;
30 }