Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / COFF / undefined-symbol-itanium-i386.s
blob0aa2bfb0d1991bfa7c443f4ddb7a022bbcd22d87
1 # REQUIRES: x86
2 # RUN: llvm-mc -triple=i386-windows-gnu -filetype=obj -o %t.o %s
3 # RUN: not lld-link /lldmingw /out:%t.exe %t.o 2>&1 | FileCheck %s
4 # RUN: not lld-link /lldmingw /out:%t.exe /demangle %t.o 2>&1 | FileCheck %s
5 # RUN: not lld-link /lldmingw /out:%t.exe /demangle:no %t.o 2>&1 | FileCheck --check-prefix=NODEMANGLE %s
7 # NODEMANGLE: error: undefined symbol: __Z3fooi
8 # NODEMANGLE: error: undefined symbol: __Z3barPKc
9 # NODEMANGLE: error: undefined symbol: __imp___Z3bazv
10 # NODEMANGLE: error: undefined symbol: _Z3fooi
11 # NODEMANGLE: error: undefined symbol: __imp__cfunc
13 # CHECK: error: undefined symbol: foo(int)
14 # CHECK-NEXT: >>> referenced by {{.*}}.o:(_main)
15 # CHECK-NEXT: >>> referenced by {{.*}}.o:(_main)
16 # CHECK-EMPTY:
17 # CHECK-NEXT: error: undefined symbol: bar(char const*)
18 # CHECK-NEXT: >>> referenced by {{.*}}.o:(_main)
19 # CHECK-NEXT: >>> referenced by {{.*}}.o:(_f1)
20 # CHECK-EMPTY:
21 # CHECK-NEXT: error: undefined symbol: __declspec(dllimport) baz()
22 # CHECK-NEXT: >>> referenced by {{.*}}.o:(_f2)
23 # CHECK-EMPTY:
24 # CHECK-NEXT: error: undefined symbol: _Z3fooi
25 # CHECK-NEXT: >>> referenced by {{.*}}.o:(_f2)
26 # CHECK-EMPTY:
27 # CHECK-NEXT: error: undefined symbol: __declspec(dllimport) _cfunc
28 # CHECK-NEXT: >>> referenced by {{.*}}.o:(_f2)
30 .section .text,"xr",one_only,_main
31 .globl _main
32 _main:
33 call __Z3fooi
34 call __Z3fooi
35 call __Z3barPKc
37 _f1:
38 call __Z3barPKc
39 .Lfunc_end1:
41 .section .text,"xr",one_only,_f2
42 .globl _f2
43 _f2:
44 call *__imp___Z3bazv
45 call _Z3fooi
46 call *__imp__cfunc