]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gdc.test/compilable/minimal2.d
d: Import dmd b8384668f, druntime e6caaab9, phobos 5ab9ad256 (v2.098.0-beta.1)
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / compilable / minimal2.d
CommitLineData
5fee5ec3
IB
1// DFLAGS:
2// REQUIRED_ARGS: -defaultlib=
3// EXTRA_SOURCES: extra-files/minimal/object.d
4
5// This test ensures that interfaces and classes can be used in a minimal
6// runtime as long as they only contain static members.
7
8// This should compile, but will not link and run properly without
9// a thread-local storage (TLS) implementation.
10
11interface I
12{
13 static int i;
14}
15
16class A : I
17{
18 static int a;
19}
20
21class B : A
22{
23 static int b;
24}
25
26void main()
27{
28 B.i = 32;
29 B.a = 42;
30 B.b = 52;
31}