Skip to content

Commit f191724

Browse files
jmorseshahmishal
authored andcommitted
Rename a flang test case
On Windows and macOS, the filesystem is case insensitive, and these files interfere with each other. Reading through, the case of the file extension is part of the test. I've altered the rest of the name instead. (cherry picked from commit 6c0a160) (cherry picked from commit 0a1b111)
1 parent 90ed2ca commit f191724

File tree

2 files changed

+102
-0
lines changed

2 files changed

+102
-0
lines changed

clang/test/Driver/flang/flang.f90

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
! Check that flang -fc1 is invoked when in --driver-mode=flang.
2+
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.
6+
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)
14+
15+
! All invocations should begin with flang -fc1, consume up to here.
16+
! ALL-LABEL: "{{[^"]*}}flang" "-fc1"
17+
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" "-"
24+
25+
! RUN: %clang --driver-mode=flang -### -emit-ast %s 2>&1 | FileCheck --check-prefixes=ALL,CHECK-EMIT-AST %s
26+
! CHECK-EMIT-AST-DAG: "-triple"
27+
! CHECK-EMIT-AST-DAG: "-emit-ast"
28+
! CHECK-EMIT-AST-DAG: "-o" "{{[^"]*}}.ast"
29+
30+
! RUN: %clang --driver-mode=flang -### -fsyntax-only %s 2>&1 | FileCheck --check-prefixes=ALL,CHECK-SYNTAX-ONLY %s
31+
! CHECK-SYNTAX-ONLY-NOT: "-o"
32+
! CHECK-SYNTAX-ONLY-DAG: "-fsyntax-only"
33+
34+
! RUN: %clang --driver-mode=flang -### -emit-llvm -S %s 2>&1 | FileCheck --check-prefixes=ALL,CHECK-EMIT-LLVM-IR %s
35+
! CHECK-EMIT-LLVM-IR-DAG: "-emit-llvm"
36+
! CHECK-EMIT-LLVM-IR-DAG: "-o" "{{[^"]*}}.ll"
37+
38+
! RUN: %clang --driver-mode=flang -### -emit-llvm %s 2>&1 | FileCheck --check-prefixes=ALL,CHECK-EMIT-LLVM-BC %s
39+
! CHECK-EMIT-LLVM-BC-DAG: "-emit-llvm-bc"
40+
! CHECK-EMIT-LLVM-BC-DAG: "-o" "{{[^"]*}}.bc"
41+
42+
! RUN: %clang --driver-mode=flang -### -S %s 2>&1 | FileCheck --check-prefixes=ALL,CHECK-S %s
43+
! CHECK-S-DAG: "-S"
44+
! CHECK-S-DAG: "-o" "{{[^"]*}}.s"
45+
46+
! RUN: %clang --driver-mode=flang -### %s 2>&1 | FileCheck --check-prefixes=ALL,CHECK-EMIT-OBJ %s
47+
! CHECK-EMIT-OBJ-DAG: "-emit-obj"
48+
! CHECK-EMIT-OBJ-DAG: "-o" "{{[^"]*}}.o"
49+
50+
! Should end in the input file.
51+
! ALL: "{{.*}}flang.f90"{{$}}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
! Check that flang -fc1 is invoked when in --driver-mode=flang.
2+
3+
! This is a copy of flang.f90 because the driver has logic in it which
4+
! differentiates between F90 and f90 files. Flang will not treat these files
5+
! differently.
6+
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)
14+
15+
! All invocations should begin with flang -fc1, consume up to here.
16+
! ALL-LABEL: "{{[^"]*}}flang" "-fc1"
17+
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" "-"
24+
25+
! RUN: %clang --driver-mode=flang -### -emit-ast %s 2>&1 | FileCheck --check-prefixes=ALL,CHECK-EMIT-AST %s
26+
! CHECK-EMIT-AST-DAG: "-triple"
27+
! CHECK-EMIT-AST-DAG: "-emit-ast"
28+
! CHECK-EMIT-AST-DAG: "-o" "{{[^"]*}}.ast"
29+
30+
! RUN: %clang --driver-mode=flang -### -fsyntax-only %s 2>&1 | FileCheck --check-prefixes=ALL,CHECK-SYNTAX-ONLY %s
31+
! CHECK-SYNTAX-ONLY-NOT: "-o"
32+
! CHECK-SYNTAX-ONLY-DAG: "-fsyntax-only"
33+
34+
! RUN: %clang --driver-mode=flang -### -emit-llvm -S %s 2>&1 | FileCheck --check-prefixes=ALL,CHECK-EMIT-LLVM-IR %s
35+
! CHECK-EMIT-LLVM-IR-DAG: "-emit-llvm"
36+
! CHECK-EMIT-LLVM-IR-DAG: "-o" "{{[^"]*}}.ll"
37+
38+
! RUN: %clang --driver-mode=flang -### -emit-llvm %s 2>&1 | FileCheck --check-prefixes=ALL,CHECK-EMIT-LLVM-BC %s
39+
! CHECK-EMIT-LLVM-BC-DAG: "-emit-llvm-bc"
40+
! CHECK-EMIT-LLVM-BC-DAG: "-o" "{{[^"]*}}.bc"
41+
42+
! RUN: %clang --driver-mode=flang -### -S %s 2>&1 | FileCheck --check-prefixes=ALL,CHECK-S %s
43+
! CHECK-S-DAG: "-S"
44+
! CHECK-S-DAG: "-o" "{{[^"]*}}.s"
45+
46+
! RUN: %clang --driver-mode=flang -### %s 2>&1 | FileCheck --check-prefixes=ALL,CHECK-EMIT-OBJ %s
47+
! CHECK-EMIT-OBJ-DAG: "-emit-obj"
48+
! CHECK-EMIT-OBJ-DAG: "-o" "{{[^"]*}}.o"
49+
50+
! Should end in the input file.
51+
! ALL: "{{.*}}flang_ucase.F90"{{$}}

0 commit comments

Comments
 (0)