File: main.d

package info (click to toggle)
ldc 1%3A1.30.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 59,248 kB
  • sloc: cpp: 61,598; ansic: 14,545; sh: 1,014; makefile: 972; asm: 510; objc: 135; exp: 48; python: 12
file content (20 lines) | stat: -rw-r--r-- 522 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// compile & link at once with -main:
// RUN: %ldc -main %s %S/inputs/include_imports2.d -of=%t1%exe
// RUN: %t1%exe | FileCheck %s

// compile separately, then link with -main:
// RUN: %ldc -c %s %S/inputs/include_imports2.d -od=%t.obj
// RUN: %ldc -main %t.obj/main%obj %t.obj/include_imports2%obj -of=%t2%exe
// RUN: %t2%exe | FileCheck %s

module main_;

import core.stdc.stdio : printf;
import inputs.include_imports2 : bar;

shared static this()
{
    bar();
    // CHECK: module ctor
    printf("module ctor\n");
}