[WebAssembly] Fix asan issue from https://reviews.llvm.org/D121349
[llvm-project.git] / flang / test / Driver / emit-mlir.f90
blob006774a952f49e8362edeae3fe10f50b60079fda
1 ! Test the `-emit-mlir` option
3 !-------------
4 ! RUN COMMANDS
5 !-------------
6 ! RUN: %flang_fc1 -emit-mlir %s -o - | FileCheck %s
7 ! RUN: %flang_fc1 -emit-fir %s -o - | FileCheck %s
9 ! Verify that an `.mlir` file is created when `-emit-mlir` is used. Do it in a temporary directory, which will be cleaned up by the
10 ! LIT runner.
11 ! RUN: rm -rf %t-dir && mkdir -p %t-dir && cd %t-dir
12 ! RUN: cp %s .
13 ! RUN: %flang_fc1 -emit-mlir emit-mlir.f90 && ls emit-mlir.mlir
15 !----------------
16 ! EXPECTED OUTPUT
17 !----------------
18 ! CHECK: module attributes {
19 ! CHECK-LABEL: func @_QQmain() {
20 ! CHECK-NEXT: return
21 ! CHECK-NEXT: }
22 ! CHECK-NEXT: }
24 !------
25 ! INPUT
26 !------
27 end program