Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / COFF / entry-inference-mingw.s
blob52bea8b129c32bbac08d1b294192f77ed4ddd45d
1 # REQUIRES: x86
2 # RUN: llvm-mc -triple=x86_64-windows-gnu %s -filetype=obj -o %t.o
4 # RUN: lld-link -lldmingw %t.o -out:%t-default.exe 2>&1 | FileCheck -allow-empty -check-prefix=LINK %s
5 # RUN: lld-link -lldmingw %t.o -out:%t-cui.exe -subsystem:console 2>&1 | FileCheck -allow-empty -check-prefix=LINK %s
6 # RUN: lld-link -lldmingw %t.o -out:%t-gui.exe -subsystem:windows 2>&1 | FileCheck -allow-empty -check-prefix=LINK %s
8 # RUN: llvm-readobj --file-headers %t-default.exe | FileCheck -check-prefix=CUI %s
9 # RUN: llvm-readobj --file-headers %t-cui.exe | FileCheck -check-prefix=CUI %s
10 # RUN: llvm-readobj --file-headers %t-gui.exe | FileCheck -check-prefix=GUI %s
12 # Check that this doesn't print any warnings.
13 # LINK-NOT: found both wmain and main
15 # CUI: AddressOfEntryPoint: 0x1001
16 # CUI: Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI (0x3)
18 # GUI: AddressOfEntryPoint: 0x1002
19 # GUI: Subsystem: IMAGE_SUBSYSTEM_WINDOWS_GUI (0x2)
22 .text
23 .globl mainCRTStartup
24 .globl WinMainCRTStartup
25 # MinGW only uses the entry points above, these other ones aren't
26 # used as entry.
27 .globl main
28 .globl wmain
29 .globl wmainCRTStartup
30 .globl wWinMainCRTStartup
31 foo:
32 ret
33 mainCRTStartup:
34 ret
35 WinMainCRTStartup:
36 ret
37 main:
38 ret
39 wmain:
40 ret
41 wmainCRTStartup:
42 ret
43 wWinMainCRTStartup:
44 ret