File: main.d

package info (click to toggle)
ldc 1%3A1.40.0-5
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 63,308 kB
  • sloc: cpp: 85,368; ansic: 21,877; makefile: 1,705; sh: 1,018; asm: 584; 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");
}