summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/runnable/testpic.d
blob: 60f67756a86191c466810e47e32c8547cec73520 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// PERMUTE_ARGS: -fPIC -O

extern (C) int printf(const char*, ...);

/***************************************************/

align(16) struct S41
{
    int[4] a;
}

shared int x41;
shared S41 s41;

void test11310()
{
    printf("&x = %p\n", &x41);
    printf("&s = %p\n", &s41);
    assert((cast(int)&s41 & 0xF) == 0);
}

/***************************************************/


struct S17034
{
@nogc pure nothrow:
    private long v;
    void foo()
    {
        v >>>= 1;
        if (!v)
            return;
        v >>>= 1;
    }
}

void test17034()
{
    auto s = S17034(1L);
    s.foo();
    assert(s.v == 0);
}

/***************************************************/

int main()
{
    test11310();
    test17034();

    printf("Success\n");
    return 0;
}