aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/compilable/sharedopt.d
blob: bac0ce03b5a9166444bd117696246745519c8e12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// REQUIRED_ARGS: -O

void _d_critical_term()
{
    for (auto p = head; p; p = p.next)
        destroyMutex(p.i);
}

shared S* head;

struct S
{
    S* next;
    int i;
}

void destroyMutex(int i);

struct Mutex { int i; }