[WebAssembly] Fix asan issue from https://reviews.llvm.org/D121349
[llvm-project.git] / flang / test / Driver / code-gen-x86.f90
blobe6306774346ef9584865dbb8d877083414a85c43
1 ! Test -emit-obj (X86)
3 ! REQUIRES: x86-registered-target, aarch64-registered-target
4 ! UNSUPPORTED: darwin, macos
6 !-------------
7 ! RUN COMMANDS
8 !-------------
9 ! RUN: rm -f %t.o
10 ! RUN: %flang_fc1 -triple x86_64-unknown-linux-gnu -emit-obj %s -o %t.o
11 ! RUN: llvm-objdump --triple x86_64-unknown-linux-gnu --disassemble-all %t.o | FileCheck %s --check-prefix=CORRECT_TRIPLE
12 ! RUN: rm -f %t.o
13 ! RUN: %flang --target=x86_64-unknown-linux-gnu -c %s -o %t.o
14 ! RUN: llvm-objdump --triple x86_64-unknown-linux-gnu --disassemble-all %t.o | FileCheck %s --check-prefix=CORRECT_TRIPLE
16 ! RUN: %flang -c --target=x86_64-unknown-linux-gnu %s -o %t.o
17 ! RUN: llvm-objdump --triple aarch64-unknown-linux-gnu --disassemble-all %t.o | FileCheck %s --check-prefix=INCORRECT_TRIPLE
19 !----------------
20 ! EXPECTED OUTPUT
21 !----------------
22 ! CORRECT_TRIPLE-LABEL: <_QQmain>:
23 ! CORRECT_TRIPLE-NEXT: retq
25 ! When incorrect triple is used to disassemble, there won't be a ret(q) instruction at all.
26 ! INCORRECT_TRIPLE-LABEL: <_QQmain>:
27 ! INCORRECT_TRIPLE-NOT: ret
29 !------
30 ! INPUT
31 !------
32 end program