aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/runnable/test24029.c
blob: 145f2c28725af8fa9be21a16fe41cede2252845e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// https://issues.dlang.org/show_bug.cgi?id=24029

int x = 0;
int y = 0;

void a()
{
    (__extension__ ({ x += 2; })); // test.a.__dgliteral1
}

void b()
{
    (__extension__ ({ y += 1; })); // test.b.__dgliteral1
}

int main(void)
{
    a();
    b();
    __check(x == 2);
    __check(y == 1);
    return 0;
}