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