Debian Codegraph @

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

raw
1 // https://issues.dlang.org/show_bug.cgi?id=7932
2
3 import core.stdc.stdio;
4
5 size_t N;
6
7 class C
8 {
9 protected void f(size_t n)
10 out
11 {
12 printf("out: this=%p &n=%p n=%zu\n",
13 cast(void*) this, &n, n);
14 assert (N == n);
15 }
16 do
17 {
18 int dummy;
19 //printf("\n");
20 N = n;
21 printf("body: this=%p &dummy=%p &N=%p N=%zu\n",
22 cast(void*) this, &dummy, &N, N);
23 }
24 }
25
26 void main()
27 {
28 auto x = new C;
29 x.f(1);
30 }