Debian Codegraph @

gcc/testsuite/gdc.dg/lto/ltotests_0.d

raw
1 // { dg-lto-do link }
2 module ltotests_0;
3
4 import core.stdc.stdio;
5
6
7 /******************************************/
8
9 interface I284
10 {
11 void m284();
12 }
13
14 class C284 : I284
15 {
16 void m284() { }
17 }
18
19 /******************************************/
20
21 class C304
22 {
23 }
24
25 C304 c304;
26
27 /******************************************/
28 // https://bugzilla.gdcproject.org/show_bug.cgi?id=61
29
30 struct S61a
31 {
32 void a() { }
33 void b() { }
34 }
35
36 struct S61b
37 {
38 S61a other;
39
40 void foo()
41 {
42 bar();
43 }
44
45 void bar()
46 {
47 try
48 other.a();
49 catch (Throwable)
50 other.b();
51 }
52 }
53
54 /******************************************/
55 // https://bugzilla.gdcproject.org/show_bug.cgi?id=88
56
57 extern(C) int test88a();
58
59 void test88()
60 {
61 test88a();
62 }
63
64 /******************************************/
65 // https://bugzilla.gdcproject.org/show_bug.cgi?id=252
66
67 class C252
68 {
69 struct S252
70 {
71 int i;
72 ubyte u;
73 }
74 S252 s;
75 }
76
77 void test252()
78 {
79 C252 c = new C252();
80 }
81
82 /******************************************/
83
84 void main(string[])
85 {
86 test88();
87 test252();
88
89 printf("Success!\n");
90 }