☰
Debian Codegraph
@
15:15.3.rel1-2
15:15.3.rel1-1
/
/
gcc
/
testsuite
/
gdc.test
/
runnable
/
test19185.d
☽
☼
gcc/testsuite/gdc.test/runnable/test19185.d
code
plain
raw
1
// https://issues.dlang.org/show_bug.cgi?id=19185
2
3
int fun()
4
{
5
int x = 2;
6
struct A
7
{
8
int a;
9
this(int a)
10
{
11
this.a = a + x; // segault here
12
}
13
}
14
15
A a = 5;
16
return a.a;
17
}
18
19
void main()
20
{
21
assert(fun() == 7);
22
}