[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Driver / flang / flang.f90
blob9b16f233b231adda19f394d1d5351bbeb4f7e3af
1 ! Check that flang -fc1 is invoked when in --driver-mode=flang.
3 ! This is a copy of flang_ucase.F90 because the driver has logic in it which
4 ! differentiates between F90 and f90 files. Flang will not treat these files
5 ! differently.
7 ! Test various output types:
8 ! * -E
9 ! * -fsyntax-only
10 ! * -emit-llvm -S
11 ! * -emit-llvm
12 ! * -S
13 ! * (no type specified, resulting in an object file)
15 ! All invocations should begin with flang -fc1, consume up to here.
16 ! ALL-LABEL: "{{[^"]*}}flang-new" "-fc1"
18 ! Check that f90 files are not treated as "previously preprocessed"
19 ! ... in --driver-mode=flang.
20 ! RUN: %clang --driver-mode=flang -### -E %s 2>&1 | FileCheck --check-prefixes=ALL,CHECK-E %s
21 ! CHECK-E-NOT: previously preprocessed input
22 ! CHECK-E-DAG: "-E"
23 ! CHECK-E-DAG: "-o" "-"
25 ! RUN: %clang --driver-mode=flang -### -emit-ast %s 2>&1 | FileCheck --check-prefixes=ALL,CHECK-EMIT-AST %s
26 ! CHECK-EMIT-AST-DAG: "-emit-ast"
27 ! CHECK-EMIT-AST-DAG: "-o" "{{[^"]*}}.ast"
29 ! RUN: %clang --driver-mode=flang -### -fsyntax-only %s 2>&1 | FileCheck --check-prefixes=ALL,CHECK-SYNTAX-ONLY %s
30 ! CHECK-SYNTAX-ONLY-NOT: "-o"
31 ! CHECK-SYNTAX-ONLY-DAG: "-fsyntax-only"
33 ! RUN: %clang --driver-mode=flang -### -emit-llvm -S %s 2>&1 | FileCheck --check-prefixes=ALL,CHECK-EMIT-LLVM-IR %s
34 ! CHECK-EMIT-LLVM-IR-DAG: "-emit-llvm"
35 ! CHECK-EMIT-LLVM-IR-DAG: "-o" "{{[^"]*}}.ll"
37 ! RUN: %clang --driver-mode=flang -### -emit-llvm %s 2>&1 | FileCheck --check-prefixes=ALL,CHECK-EMIT-LLVM-BC %s
38 ! CHECK-EMIT-LLVM-BC-DAG: "-emit-llvm-bc"
39 ! CHECK-EMIT-LLVM-BC-DAG: "-o" "{{[^"]*}}.bc"
41 ! RUN: %clang --driver-mode=flang -### -S %s 2>&1 | FileCheck --check-prefixes=ALL,CHECK-S %s
42 ! CHECK-S-DAG: "-S"
43 ! CHECK-S-DAG: "-o" "{{[^"]*}}.s"
45 ! RUN: %clang --driver-mode=flang -### -fintegrated-as %s 2>&1 | FileCheck --check-prefixes=ALL,CHECK-EMIT-OBJ %s
46 ! CHECK-EMIT-OBJ-DAG: "-emit-obj"
47 ! CHECK-EMIT-OBJ-DAG: "-o" "{{[^"]*}}.o"
49 ! Should end in the input file.
50 ! ALL: "{{.*}}flang.f90"{{$}}