Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion flang/test/Driver/convert.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
! Ensure argument -fconvert=<value> accepts all relevant options and produces an
! error if an invalid value is specified.
! error if an invalid value is specified.

!--------------------------
! FLANG DRIVER (flang)
Expand Down
4 changes: 2 additions & 2 deletions flang/test/Driver/do_concurrent_to_omp_cli.f90
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
! RUN: %flang --help | FileCheck %s --check-prefix=FLANG

! FLANG: -fdo-concurrent-to-openmp=<value>
! FLANG-NEXT: Try to map `do concurrent` loops to OpenMP [none|host|device]
! FLANG-NEXT: Try to map `do concurrent` loops to OpenMP [none|host|device]

! RUN: bbc --help | FileCheck %s --check-prefix=BBC

! BBC: -fdo-concurrent-to-openmp=<string>
! BBC-SAME: Try to map `do concurrent` loops to OpenMP [none|host|device]
! BBC-SAME: Try to map `do concurrent` loops to OpenMP [none|host|device]

! RUN: %flang -c -fdo-concurrent-to-openmp=host %s 2>&1 \
! RUN: | FileCheck %s --check-prefix=OPT
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Driver/emit-mlir.f90
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
! CHECK-NEXT: func.func @main(%arg0: i32, %arg1: !llvm.ptr, %arg2: !llvm.ptr) -> i32 {
! CHECK-NEXT: %c0_i32 = arith.constant 0 : i32
! CHECK-NEXT: %0 = fir.zero_bits !fir.ref<tuple<i32, !fir.ref<!fir.array<0xtuple<!fir.ref<i8>, !fir.ref<i8>>>>>>
! CHECK-NEXT: fir.call @_FortranAProgramStart(%arg0, %arg1, %arg2, %0) {{.*}} : (i32, !llvm.ptr, !llvm.ptr, !fir.ref<tuple<i32, !fir.ref<!fir.array<0xtuple<!fir.ref<i8>, !fir.ref<i8>>>>>>)
! CHECK-NEXT: fir.call @_FortranAProgramStart(%arg0, %arg1, %arg2, %0) {{.*}} : (i32, !llvm.ptr, !llvm.ptr, !fir.ref<tuple<i32, !fir.ref<!fir.array<0xtuple<!fir.ref<i8>, !fir.ref<i8>>>>>>)
! CHECK-NEXT: fir.call @_QQmain() fastmath<contract> : () -> ()
! CHECK-NEXT: fir.call @_FortranAProgramEndStatement() {{.*}} : () -> ()
! CHECK-NEXT: return %c0_i32 : i32
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Driver/fatal-errors-parsing.f90
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ program p
! CHECK2: fatal-errors-parsing.f90:{{.*}} error:
continue
end

subroutine s
contains
! CHECK1-NOT: error:
Expand Down
1 change: 0 additions & 1 deletion flang/test/Driver/fatal-errors-semantics.f90
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,3 @@ subroutine test
call soa(null())
end
end

2 changes: 1 addition & 1 deletion flang/test/Driver/flang-ld-aarch64.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! Check linker flags for AArch64 linux, since it needs both libgcc and
! Check linker flags for AArch64 linux, since it needs both libgcc and
! compiler-rt, with compiler-rt second when -rtlib=libgcc.

! RUN: %flang -### -rtlib=libgcc --target=aarch64-linux-gnu %S/Inputs/hello.f90 2>&1 | FileCheck %s
Expand Down
6 changes: 3 additions & 3 deletions flang/test/Driver/flang-ld-powerpc.f90
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
!! -static-libflang_rt in the future. Need to add that option here.

!! Because flang-rt currently only supports
!! LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON, use
!! LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON, use
!! resource_dir_with_per_target_subdir as inputs.

! Check powerpc64-ibm-aix 64-bit linking to static flang-rt by default
Expand All @@ -26,7 +26,7 @@
! AIX64-LD-PER-TARGET-DEFAULT-NOT: "-L/[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}powerpc64-ibm-aix"


! Check powerpc64-ibm-aix 64-bit linking to static flang-rt by option
! Check powerpc64-ibm-aix 64-bit linking to static flang-rt by option
! RUN: %flang -static-libflangrt -Werror %s -### 2>&1 \
! RUN: --target=powerpc64-ibm-aix \
! RUN: -resource-dir=%S/../../../clang/test/Driver/Inputs/resource_dir_with_per_target_subdir \
Expand All @@ -44,7 +44,7 @@
! AIX64-LD-PER-TARGET-STATIC-SAME: "-lpthread"


! Check powerpc64-ibm-aix 64-bit linking to shared flang-rt by option
! Check powerpc64-ibm-aix 64-bit linking to shared flang-rt by option
! RUN: %flang -shared-libflangrt -Werror %s -### 2>&1 \
! RUN: --target=powerpc64-ibm-aix \
! RUN: -resource-dir=%S/../../../clang/test/Driver/Inputs/resource_dir_with_per_target_subdir \
Expand Down
6 changes: 3 additions & 3 deletions flang/test/Driver/gcc-toolchain-install-dir.f90
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
! RUN: %flang 2>&1 -### -v -o %t %s -no-integrated-as -fuse-ld=ld --target=i386-unknown-linux-gnu --gcc-install-dir=%S/Inputs/basic_cross_linux_tree/usr/lib/gcc/i386-unknown-linux-gnu/10.2.0 | FileCheck %s --check-prefix=CHECK-I386
! RUN: %flang 2>&1 -### -v -o %t %s -no-integrated-as -fuse-ld=ld --target=i386-unknown-linux-gnu --gcc-toolchain=%S/Inputs/basic_cross_linux_tree/usr | FileCheck %s --check-prefix=CHECK-I386
! CHECK-I386: Selected GCC installation: [[PREFIX:[^"]+]]/Inputs/basic_cross_linux_tree/usr/lib/gcc/i386-unknown-linux-gnu/10.2.0
! CHECK-I386: "-fc1" "-triple" "i386-unknown-linux-gnu"
! CHECK-I386: "-fc1" "-triple" "i386-unknown-linux-gnu"
! CHECK-I386: "[[PREFIX:[^"]+]]/Inputs/basic_cross_linux_tree/usr/lib/gcc/i386-unknown-linux-gnu/10.2.0/../../../../i386-unknown-linux-gnu/bin{{/|\\\\}}as"
! CHECK-I386: "[[PREFIX]]/Inputs/basic_cross_linux_tree/usr/lib/gcc/i386-unknown-linux-gnu/10.2.0/../../../../i386-unknown-linux-gnu/bin{{/|\\\\}}ld" {{.*}} "-m" "elf_i386"
! CHECK-I386-SAME: "-L[[PREFIX]]/Inputs/basic_cross_linux_tree/usr/lib/gcc/i386-unknown-linux-gnu/10.2.0"
! CHECK-I386-SAME: "-L[[PREFIX]]/Inputs/basic_cross_linux_tree/usr/lib/gcc/i386-unknown-linux-gnu/10.2.0"
! CHECK-I386-SAME: "-L[[PREFIX]]/Inputs/basic_cross_linux_tree/usr/lib/gcc/i386-unknown-linux-gnu/10.2.0/../../../../i386-unknown-linux-gnu/lib"

! RUN: %flang 2>&1 -### -v -o %t %s -no-integrated-as -fuse-ld=ld --target=x86_64-unknown-linux-gnu --gcc-install-dir=%S/Inputs/basic_cross_linux_tree/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0 | FileCheck %s --check-prefix=CHECK-X86-64
Expand All @@ -17,5 +17,5 @@
! CHECK-X86-64: "-fc1" "-triple" "x86_64-unknown-linux-gnu"
! CHECK-X86-64: "[[PREFIX:[^"]+]]/Inputs/basic_cross_linux_tree/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin{{/|\\\\}}as" "--64"
! CHECK-X86-64: "[[PREFIX]]/Inputs/basic_cross_linux_tree/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin{{/|\\\\}}ld" {{.*}} "-m" "elf_x86_64"
! CHECK-X86-64-SAME: "-L[[PREFIX]]/Inputs/basic_cross_linux_tree/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0"
! CHECK-X86-64-SAME: "-L[[PREFIX]]/Inputs/basic_cross_linux_tree/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0"
! CHECK-X86-64-SAME: "-L[[PREFIX]]/Inputs/basic_cross_linux_tree/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/lib"
4 changes: 2 additions & 2 deletions flang/test/Driver/large-data-threshold.f90
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
! RUN: %flang -### -c --target=x86_64 -mlarge-data-threshold=32768 %s 2>&1 | FileCheck %s --check-prefix=NO-MCMODEL
! RUN: %flang -### -c --target=x86_64 -mcmodel=small -mlarge-data-threshold=32768 %s 2>&1 | FileCheck %s --check-prefix=NO-MCMODEL
! RUN: not %flang -### -c --target=aarch64 -mcmodel=small -mlarge-data-threshold=32768 %s 2>&1 | FileCheck %s --check-prefix=NOT-SUPPORTED


! CHECK: "{{.*}}flang" "-fc1"
! CHECK-SAME: "-mlarge-data-threshold=32768"
! CHECK-59000: "{{.*}}flang" "-fc1"
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Driver/lto-fatlto.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
! REQUIRES: x86-registered-target
! checks fatlto objects: that valid bitcode is included in the object file generated.
! checks fatlto objects: that valid bitcode is included in the object file generated.

! RUN: %flang -fc1 -triple x86_64-unknown-linux-gnu -flto -ffat-lto-objects -emit-obj %s -o %t.o
! RUN: llvm-readelf -S %t.o | FileCheck %s --check-prefixes=ELF
Expand Down
8 changes: 4 additions & 4 deletions flang/test/Driver/mlir-debug-pass-pipeline.f90
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
! ALL-NEXT: CSE
! ALL-NEXT: (S) 0 num-cse'd - Number of operations CSE'd
! ALL-NEXT: (S) 0 num-dce'd - Number of operations DCE'd
! ALL-NEXT: MIFOpConversion
! ALL-NEXT: MIFOpConversion
! ALL-NEXT: BoxedProcedurePass

! ALL-NEXT: Pipeline Collection : ['fir.global', 'func.func', 'gpu.module', 'omp.declare_reduction', 'omp.private']
Expand All @@ -109,10 +109,10 @@
! ALL-NEXT: 'func.func' Pipeline
! ALL-NEXT: AbstractResultOpt
! ALL-NEXT: 'gpu.module' Pipeline
! ALL-NEXT: Pipeline Collection : ['func.func', 'gpu.func']
! ALL-NEXT: 'func.func' Pipeline
! ALL-NEXT: Pipeline Collection : ['func.func', 'gpu.func']
! ALL-NEXT: 'func.func' Pipeline
! ALL-NEXT: AbstractResultOpt
! ALL-NEXT: 'gpu.func' Pipeline
! ALL-NEXT: 'gpu.func' Pipeline
! ALL-NEXT: AbstractResultOpt
! ALL-NEXT: 'omp.declare_reduction' Pipeline
! ALL-NEXT: AbstractResultOpt
Expand Down
8 changes: 4 additions & 4 deletions flang/test/Driver/mlir-pass-pipeline.f90
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
! ALL-NEXT: (S) 0 num-dce'd - Number of operations DCE'd
! O2-NEXT: 'func.func' Pipeline
! O2-NEXT: SetRuntimeCallAttributes
! ALL-NEXT: MIFOpConversion
! ALL-NEXT: MIFOpConversion
! ALL-NEXT: BoxedProcedurePass
! O2-NEXT: AddAliasTags

Expand All @@ -152,10 +152,10 @@
! ALL-NEXT: 'func.func' Pipeline
! ALL-NEXT: AbstractResultOpt
! ALL-NEXT: 'gpu.module' Pipeline
! ALL-NEXT: Pipeline Collection : ['func.func', 'gpu.func']
! ALL-NEXT: 'func.func' Pipeline
! ALL-NEXT: Pipeline Collection : ['func.func', 'gpu.func']
! ALL-NEXT: 'func.func' Pipeline
! ALL-NEXT: AbstractResultOpt
! ALL-NEXT: 'gpu.func' Pipeline
! ALL-NEXT: 'gpu.func' Pipeline
! ALL-NEXT: AbstractResultOpt
! ALL-NEXT: 'omp.declare_reduction' Pipeline
! ALL-NEXT: AbstractResultOpt
Expand Down
4 changes: 2 additions & 2 deletions flang/test/Driver/multiple-fc1-input.f90
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
! RUN: %flang_fc1 -emit-fir %s %s -o - | FileCheck %s
subroutine foo()
end subroutine
! CHECK: func @_QPfoo()
! CHECK: func @_QPfoo()
! CHECK: func @_QPfoo()
! CHECK: func @_QPfoo()
14 changes: 7 additions & 7 deletions flang/test/Driver/omp-driver-offload.f90
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
! Test that flang OpenMP and OpenMP offload related
! commands forward or expand to the appropriate commands
! Test that flang OpenMP and OpenMP offload related
! commands forward or expand to the appropriate commands
! for flang -fc1 as expected. Assumes a gfx90a, aarch64,
! and sm_70 architecture, but doesn't require one to be
! installed or compiled for, just testing the appropriate
! generation of jobs are created with the correct
! and sm_70 architecture, but doesn't require one to be
! installed or compiled for, just testing the appropriate
! generation of jobs are created with the correct
! corresponding arguments.

! Test regular -fopenmp with no offload
Expand Down Expand Up @@ -47,7 +47,7 @@
! OFFLOAD-DEVICE-NEXT: "{{[^"]*}}flang" "-fc1" "-triple" "nvptx64-nvidia-cuda"
! OFFLOAD-DEVICE-NOT: "{{[^"]*}}flang" "-fc1" "-triple" "aarch64-unknown-linux-gnu"

! Test regular -fopenmp with offload for basic fopenmp-is-target-device flag addition and correct fopenmp
! Test regular -fopenmp with offload for basic fopenmp-is-target-device flag addition and correct fopenmp
! RUN: %flang -### -fopenmp --offload-arch=gfx90a -fopenmp-targets=amdgcn-amd-amdhsa -nogpulib %s 2>&1 | FileCheck --check-prefixes=CHECK-OPENMP-IS-TARGET-DEVICE %s
! CHECK-OPENMP-IS-TARGET-DEVICE: "{{[^"]*}}flang" "-fc1" {{.*}} "-fopenmp" {{.*}} "-fopenmp-is-target-device" {{.*}}.f90"

Expand Down Expand Up @@ -169,7 +169,7 @@
! RUN: | FileCheck %s --check-prefixes=CHECK-OPENMP-VERSION
! CHECK-OPENMP-VERSION: "{{[^"]*}}flang" "-fc1" {{.*}} "-fopenmp" "-fopenmp-version=45" {{.*}}.f90"

! Test diagnostic error when host IR file is non-existent
! Test diagnostic error when host IR file is non-existent
! RUN: not %flang_fc1 %s -o %t 2>&1 -fopenmp -fopenmp-is-target-device \
! RUN: -fopenmp-host-ir-file-path non-existant-file.bc \
! RUN: | FileCheck %s --check-prefix=HOST-IR-MISSING
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Driver/tune-cpu-fir.f90
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
! ARMTUNE-SAME: fir.tune_cpu = "neoverse-n1"

! ARMBOTH-SAME: fir.target_cpu = "aarch64"
! ARMBOTH-SAME: fir.tune_cpu = "neoverse-n1"
! ARMBOTH-SAME: fir.tune_cpu = "neoverse-n1"

! X86CPU-SAME: fir.target_cpu = "x86-64"
! X86CPU-NOT: fir.tune_cpu = "pentium4"
Expand Down
16 changes: 8 additions & 8 deletions flang/test/Driver/version-loops.f90
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
! Test that flang forwards the -f{no-,}version-loops-for-stride
! Test that flang forwards the -f{no-,}version-loops-for-stride
! options correctly to flang -fc1 for different variants of optimisation
! and explicit flags.

! RUN: %flang -### %s -o %t 2>&1 -O3 \
! RUN: | FileCheck %s

! RUN: %flang -### %s -o %t 2>&1 -O2 \
! RUN: | FileCheck %s --check-prefix=CHECK-O2

! RUN: %flang -### %s -o %t 2>&1 -O2 -fversion-loops-for-stride \
! RUN: | FileCheck %s --check-prefix=CHECK-O2-with

! RUN: %flang -### %s -o %t 2>&1 -O4 \
! RUN: | FileCheck %s --check-prefix=CHECK-O4

! RUN: %flang -### %s -o %t 2>&1 -Ofast \
! RUN: | FileCheck %s --check-prefix=CHECK-Ofast

! RUN: %flang -### %s -o %t 2>&1 -Ofast -fno-version-loops-for-stride \
! RUN: | FileCheck %s --check-prefix=CHECK-Ofast-no

Expand All @@ -29,12 +29,12 @@

! CHECK-O2: "{{.*}}flang" "-fc1"
! CHECK-O2-NOT: "-fversion-loops-for-stride"
! CHECK-O2-SAME: "-O2"
! CHECK-O2-SAME: "-O2"

! CHECK-O2-with: "{{.*}}flang" "-fc1"
! CHECK-O2-with-SAME: "-fversion-loops-for-stride"
! CHECK-O2-with-SAME: "-O2"
! CHECK-O2-with-SAME: "-O2"

! CHECK-O4: "{{.*}}flang" "-fc1"
! CHECK-O4-SAME: "-fversion-loops-for-stride"
! CHECK-O4-SAME: "-O3"
Expand Down