[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Driver / save-temps.f90
blobab4723c1d16a417634f8d93e4f62691670e184e4
1 ! Tests for the `-save-temps` flag. As `flang` does not implement `-fc1as` (i.e. a driver for the integrated assembler), we need to
2 ! use `-fno-integrated-as` here.
4 ! UNSUPPORTED: system-windows
6 !--------------------------
7 ! Basic case: `-save-temps`
8 !--------------------------
9 ! RUN: %flang -save-temps -fno-integrated-as %s -### 2>&1 | FileCheck %s
10 ! CHECK: "-o" "save-temps.i"
11 ! CHECK-NEXT: "-o" "save-temps.bc"
12 ! CHECK-NEXT: "-o" "save-temps.s"
13 ! CHECK-NEXT: "-o" "save-temps.o"
14 ! CHECK-NEXT: "-o" "a.out"
16 !--------------------------
17 ! `-save-temps=cwd`
18 !--------------------------
19 ! This should work the same as -save-temps above
21 ! RUN: %flang -save-temps=cwd -fno-integrated-as %s -### 2>&1 | FileCheck %s -check-prefix=CWD
22 ! CWD: "-o" "save-temps.i"
23 ! CWD-NEXT: "-o" "save-temps.bc"
24 ! CWD-NEXT: "-o" "save-temps.s"
25 ! CWD-NEXT: "-o" "save-temps.o"
26 ! CWD-NEXT: "-o" "a.out"
28 !--------------------------
29 ! `-save-temps=obj`
30 !--------------------------
31 ! Check that temp files are saved in the same directory as the output file
32 ! regardless of whether -o is specified.
34 ! RUN: %flang -save-temps=obj -fno-integrated-as -o obj/dir/a.out %s -### 2>&1 | FileCheck %s -check-prefix=CHECK-OBJ
35 ! CHECK-OBJ: "-o" "obj/dir/save-temps.i"
36 ! CHECK-OBJ-NEXT: "-o" "obj/dir/save-temps.bc"
37 ! CHECK-OBJ-NEXT: "-o" "obj/dir/save-temps.s"
38 ! CHECK-OBJ-NEXT: "-o" "obj/dir/save-temps.o"
39 ! CHECK-OBJ-NEXT: "-o" "obj/dir/a.out"
41 ! RUN: %flang -save-temps=obj -fno-integrated-as %s -### 2>&1 | FileCheck %s -check-prefix=CHECK-OBJ-NOO
42 ! CHECK-OBJ-NOO: "-o" "save-temps.i"
43 ! CHECK-OBJ-NOO-NEXT: "-o" "save-temps.bc"
44 ! CHECK-OBJ-NOO-NEXT: "-o" "save-temps.s"
45 ! CHECK-OBJ-NOO-NEXT: "-o" "save-temps.o"
46 ! CHECK-OBJ-NOO-NEXT: "-o" "a.out"
48 !--------------------------
49 ! `-S` without `-save-temps`
50 !--------------------------
51 ! Check for a single `flang -fc1` invocation when NOT using -save-temps.
52 ! RUN: %flang -S %s -### 2>&1 | FileCheck %s -check-prefix=NO-TEMPS
53 ! NO-TEMPS: "-fc1"
54 ! NO-TEMPS-SAME: "-S"
55 ! NO-TEMPS-SAME: "-o" "save-temps.s"