From d5d420bb3bcc2eea926fb70fc3e6818c32e1eecc Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Wed, 29 Jun 2022 22:08:02 -0700 Subject: [PATCH] [flang][test] Remove RUN LINES?/EXPECTED OUTPUT.*/INPUT markers from test/Driver Follow-up to D128763. --- .../Driver/cpp-nocpp-command-line-macro.f90 | 3 --- .../test/Driver/cpp-nocpp-predefined-macro.F90 | 3 --- flang/test/Driver/debug-measure-parse-tree.f90 | 6 ------ flang/test/Driver/debug-parsing-log.f90 | 18 ++++++------------ flang/test/Driver/debug-provenance.f90 | 9 --------- .../test/Driver/default-backend-pipelines.f90 | 9 --------- .../Driver/default-optimization-pipelines.f90 | 9 --------- flang/test/Driver/driver-help-hidden.f90 | 9 --------- flang/test/Driver/driver-help.f90 | 9 --------- flang/test/Driver/driver-version.f90 | 6 ------ flang/test/Driver/dump-all-bad.f90 | 6 ------ flang/test/Driver/dump-all.f90 | 6 ------ flang/test/Driver/dump-parse-tree-no-sema.f90 | 6 ------ flang/test/Driver/emit-llvm.f90 | 9 --------- flang/test/Driver/escaped-backslash.f90 | 6 ------ flang/test/Driver/fdefault.f90 | 12 ------------ flang/test/Driver/fixed-free-detection.f90 | 9 --------- flang/test/Driver/fixed-free-flag.f90 | 6 ------ flang/test/Driver/fixed-line-length.f90 | 15 --------------- flang/test/Driver/flang_f_opts.f90 | 6 ------ flang/test/Driver/flarge-sizes.f90 | 6 ------ flang/test/Driver/get-definition.f90 | 11 +---------- flang/test/Driver/implicit-none.f90 | 6 ------ flang/test/Driver/include-header.f90 | 12 ------------ flang/test/Driver/include-omp-header.f90 | 9 --------- flang/test/Driver/input-from-stdin-llvm.ll | 9 --------- flang/test/Driver/input-from-stdin.f90 | 6 ------ flang/test/Driver/intrinsic-module-path.f90 | 6 ------ flang/test/Driver/macro-def-undef.F90 | 6 ------ flang/test/Driver/macro-multiline.F90 | 3 --- flang/test/Driver/missing-arg.f90 | 3 --- flang/test/Driver/missing-input.f90 | 3 --- flang/test/Driver/mllvm.f90 | 9 --------- flang/test/Driver/mllvm_vs_mmlir.f90 | 6 ------ flang/test/Driver/module-suffix.f90 | 3 --- flang/test/Driver/output-paths.f90 | 3 --- flang/test/Driver/parse-error.ll | 3 --- flang/test/Driver/parse-fir-error.ll | 3 --- flang/test/Driver/parse-ir-error.f95 | 6 ------ flang/test/Driver/phases.f90 | 6 ------ flang/test/Driver/pic-flags.f90 | 6 ------ .../predefined-macros-compiler-version.F90 | 3 --- flang/test/Driver/print-effective-triple.f90 | 6 ------ flang/test/Driver/print-target-triple.f90 | 6 ------ flang/test/Driver/std2018-wrong.f90 | 3 --- flang/test/Driver/std2018.f90 | 6 ------ flang/test/Driver/syntax-only.f90 | 9 --------- flang/test/Driver/target.f90 | 6 ------ flang/test/Driver/unparse-use-analyzed.f95 | 9 --------- flang/test/Driver/use-module-error.f90 | 3 --- flang/test/Driver/use-module.f90 | 9 --------- flang/test/Driver/werror-parse.f | 6 ------ flang/test/Driver/werror-scan.f | 6 ------ flang/test/Driver/werror-sema.f90 | 6 ------ flang/test/Driver/werror-wrong.f90 | 3 --- 55 files changed, 7 insertions(+), 361 deletions(-) diff --git a/flang/test/Driver/cpp-nocpp-command-line-macro.f90 b/flang/test/Driver/cpp-nocpp-command-line-macro.f90 index 3c0aeeeee239..63945c1aab69 100644 --- a/flang/test/Driver/cpp-nocpp-command-line-macro.f90 +++ b/flang/test/Driver/cpp-nocpp-command-line-macro.f90 @@ -5,9 +5,6 @@ ! RUN: %flang_fc1 -E -cpp -DX=A %s 2>&1 | FileCheck %s --check-prefix=DEFINED ! RUN: %flang_fc1 -E -nocpp -DX=A %s 2>&1 | FileCheck %s --check-prefix=UNDEFINED -!----------------- -! EXPECTED OUTPUT -!----------------- ! UNDEFINED:program B ! UNDEFINED-NOT:program A diff --git a/flang/test/Driver/cpp-nocpp-predefined-macro.F90 b/flang/test/Driver/cpp-nocpp-predefined-macro.F90 index 77bb38c8174c..57ea74b44409 100644 --- a/flang/test/Driver/cpp-nocpp-predefined-macro.F90 +++ b/flang/test/Driver/cpp-nocpp-predefined-macro.F90 @@ -5,9 +5,6 @@ ! RUN: %flang_fc1 -E -cpp %s 2>&1 | FileCheck %s --check-prefix=DEFINED ! RUN: %flang_fc1 -E -nocpp %s 2>&1 | FileCheck %s --check-prefix=NOT_DEFINED -!----------------- -! EXPECTED OUTPUT -!----------------- ! DEFINED: flang = 1 ! DEFINED-NEXT: flang_major = {{[1-9][0-9]*$}} diff --git a/flang/test/Driver/debug-measure-parse-tree.f90 b/flang/test/Driver/debug-measure-parse-tree.f90 index 3599acc40ef3..64c36bc24052 100644 --- a/flang/test/Driver/debug-measure-parse-tree.f90 +++ b/flang/test/Driver/debug-measure-parse-tree.f90 @@ -1,13 +1,7 @@ ! Ensure argument -fdebug-measure-parse-tree works as expected. -!---------- -! RUN LINE -!---------- ! RUN: %flang_fc1 -fdebug-measure-parse-tree %s 2>&1 | FileCheck %s --check-prefix=FRONTEND -!----------------- -! EXPECTED OUTPUT -!----------------- ! FRONTEND:Parse tree comprises {{[0-9]+}} objects and occupies {{[0-9]+}} total bytes. program A diff --git a/flang/test/Driver/debug-parsing-log.f90 b/flang/test/Driver/debug-parsing-log.f90 index ed47684cde2f..729716310945 100644 --- a/flang/test/Driver/debug-parsing-log.f90 +++ b/flang/test/Driver/debug-parsing-log.f90 @@ -1,31 +1,25 @@ ! RUN: %flang_fc1 -fdebug-dump-parsing-log %s 2>&1 | FileCheck %s -!----------------- -! EXPECTED OUTPUT -!----------------- ! Below are just few lines extracted from the dump. The actual output is much _much_ bigger. -! CHECK: {{.*[/\\]}}debug-parsing-log.f90:31:1: IMPLICIT statement +! CHECK: {{.*[/\\]}}debug-parsing-log.f90:25:1: IMPLICIT statement ! CHECK-NEXT: END PROGRAM ! CHECK-NEXT: ^ ! CHECK-NEXT: fail 3 -! CHECK-NEXT: {{.*[/\\]}}debug-parsing-log.f90:31:1: error: expected 'IMPLICIT NONE' +! CHECK-NEXT: {{.*[/\\]}}debug-parsing-log.f90:25:1: error: expected 'IMPLICIT NONE' ! CHECK-NEXT: END PROGRAM ! CHECK-NEXT: ^ -! CHECK-NEXT: {{.*[/\\]}}debug-parsing-log.f90:31:1: in the context: IMPLICIT statement +! CHECK-NEXT: {{.*[/\\]}}debug-parsing-log.f90:25:1: in the context: IMPLICIT statement ! CHECK-NEXT: END PROGRAM ! CHECK-NEXT: ^ -! CHECK-NEXT: {{.*[/\\]}}debug-parsing-log.f90:31:1: in the context: implicit part +! CHECK-NEXT: {{.*[/\\]}}debug-parsing-log.f90:25:1: in the context: implicit part ! CHECK-NEXT: END PROGRAM ! CHECK-NEXT: ^ -! CHECK-NEXT: {{.*[/\\]}}debug-parsing-log.f90:31:1: in the context: specification part +! CHECK-NEXT: {{.*[/\\]}}debug-parsing-log.f90:25:1: in the context: specification part ! CHECK-NEXT: END PROGRAM ! CHECK-NEXT: ^ -! CHECK-NEXT: {{.*[/\\]}}debug-parsing-log.f90:31:1: in the context: main program +! CHECK-NEXT: {{.*[/\\]}}debug-parsing-log.f90:25:1: in the context: main program ! CHECK-NEXT: END PROGRAM ! CHECK-NEXT: ^ -!----------------- -! TEST INPUT -!----------------- END PROGRAM diff --git a/flang/test/Driver/debug-provenance.f90 b/flang/test/Driver/debug-provenance.f90 index 147be87f7772..c96eebfce2c4 100644 --- a/flang/test/Driver/debug-provenance.f90 +++ b/flang/test/Driver/debug-provenance.f90 @@ -1,13 +1,7 @@ ! Ensure argument -fdebug-dump-provenance works as expected. -!---------- -! RUN LINE -!---------- ! RUN: %flang_fc1 -fdebug-dump-provenance %s 2>&1 | FileCheck %s -!---------------- -! EXPECTED OUTPUT -!---------------- ! CHECK: AllSources: ! CHECK-NEXT: AllSources range_ [{{[0-9]*}}..{{[0-9]*}}] ({{[0-9]*}} bytes) ! CHECK-NEXT: [1..1] (1 bytes) -> compiler '?'(0x3f) @@ -21,8 +15,5 @@ ! CHECK-NEXT: provenances [{{[0-9]*}}..{{[0-9]*}}] ({{[0-9]*}} bytes) -> offsets [{{[0-9]*}}..{{[0-9]*}}] ! CHECK-EMPTY: -!------------- -! TEST INPUT -!------------ program A end diff --git a/flang/test/Driver/default-backend-pipelines.f90 b/flang/test/Driver/default-backend-pipelines.f90 index 7d233bb751bc..f14c7796daea 100644 --- a/flang/test/Driver/default-backend-pipelines.f90 +++ b/flang/test/Driver/default-backend-pipelines.f90 @@ -2,22 +2,13 @@ ! REQUIRES: aarch64-registered-target -!----------- -! RUN LINES -!----------- ! RUN: %flang_fc1 -S -O2 %s -triple aarch64-unknown-linux-gnu -mllvm -debug-pass=Structure -o /dev/null 2>&1 | FileCheck %s --check-prefix=CHECK-O2 ! RUN: %flang_fc1 -S -O3 %s -triple aarch64-unknown-linux-gnu -mllvm -debug-pass=Structure -o /dev/null 2>&1 | FileCheck %s --check-prefix=CHECK-O3 -!----------------------- -! EXPECTED OUTPUT -!----------------------- ! CHECK-O2-NOT: SVE intrinsics optimizations ! CHECK-O3: SVE intrinsics optimizations -!------- -! INPUT -!------- subroutine simple_loop integer :: i do i=1,5 diff --git a/flang/test/Driver/default-optimization-pipelines.f90 b/flang/test/Driver/default-optimization-pipelines.f90 index d46acf4965be..3f2090411fa7 100644 --- a/flang/test/Driver/default-optimization-pipelines.f90 +++ b/flang/test/Driver/default-optimization-pipelines.f90 @@ -1,25 +1,16 @@ ! Verify that`-O{n}` is indeed taken into account when defining the LLVM optimization/middle-end pass pipeline. -!----------- -! RUN LINES -!----------- ! RUN: %flang -S -O0 %s -Xflang -fdebug-pass-manager -o /dev/null 2>&1 | FileCheck %s --check-prefix=CHECK-O0 ! RUN: %flang_fc1 -S -O0 %s -fdebug-pass-manager -o /dev/null 2>&1 | FileCheck %s --check-prefix=CHECK-O0 ! RUN: %flang -S -O2 %s -Xflang -fdebug-pass-manager -o /dev/null 2>&1 | FileCheck %s --check-prefix=CHECK-O2 ! RUN: %flang_fc1 -S -O2 %s -fdebug-pass-manager -o /dev/null 2>&1 | FileCheck %s --check-prefix=CHECK-O2 -!----------------------- -! EXPECTED OUTPUT -!----------------------- ! CHECK-O0-NOT: Running pass: SimplifyCFGPass on simple_loop_ ! CHECK-O0: Running analysis: TargetLibraryAnalysis on simple_loop_ ! CHECK-O2: Running pass: SimplifyCFGPass on simple_loop_ -!------- -! INPUT -!------- subroutine simple_loop integer :: i do i=1,5 diff --git a/flang/test/Driver/driver-help-hidden.f90 b/flang/test/Driver/driver-help-hidden.f90 index 30fff5cb5e05..929b64e5455f 100644 --- a/flang/test/Driver/driver-help-hidden.f90 +++ b/flang/test/Driver/driver-help-hidden.f90 @@ -11,9 +11,6 @@ ! RUN: not %flang_fc1 --help-hidden 2>&1 | FileCheck %s --check-prefix=ERROR-FLANG-FC1 ! RUN: not %flang_fc1 -help-hidden 2>&1 | FileCheck %s --check-prefix=ERROR-FLANG-FC1 -!---------------------------------------------------- -! EXPECTED OUTPUT FOR FLANG DRIVER (flang-new) -!---------------------------------------------------- ! CHECK:USAGE: flang-new ! CHECK-EMPTY: ! CHECK-NEXT:OPTIONS: @@ -69,14 +66,8 @@ ! CHECK-NEXT: -W Enable the specified warning ! CHECK-NEXT: -Xflang Pass to the flang compiler -!------------------------------------------------------------- -! EXPECTED OUTPUT FOR FLANG DRIVER (flang-new) -!------------------------------------------------------------- ! ERROR-FLANG: error: unknown argument '-help-hidden'; did you mean '--help-hidden'? -!------------------------------------------------------------- -! EXPECTED OUTPUT FOR FLANG FRONTEND DRIVER (flang-new -fc1) -!------------------------------------------------------------- ! Frontend driver -help-hidden is not supported ! ERROR-FLANG-FC1: error: unknown argument: '{{.*}}' diff --git a/flang/test/Driver/driver-help.f90 b/flang/test/Driver/driver-help.f90 index 9d55c0570958..fd388ca9959b 100644 --- a/flang/test/Driver/driver-help.f90 +++ b/flang/test/Driver/driver-help.f90 @@ -11,9 +11,6 @@ ! RUN: %flang_fc1 -help 2>&1 | FileCheck %s --check-prefix=HELP-FC1 ! RUN: not %flang_fc1 -helps 2>&1 | FileCheck %s --check-prefix=ERROR -!---------------------------------------------------- -! EXPECTED OUTPUT FOR FLANG DRIVER (flang) -!---------------------------------------------------- ! HELP:USAGE: flang ! HELP-EMPTY: ! HELP-NEXT:OPTIONS: @@ -67,9 +64,6 @@ ! HELP-NEXT: -W Enable the specified warning ! HELP-NEXT: -Xflang Pass to the flang compiler -!------------------------------------------------------------- -! EXPECTED OUTPUT FOR FLANG FRONTEND DRIVER (flang -fc1) -!------------------------------------------------------------- ! HELP-FC1:USAGE: flang ! HELP-FC1-EMPTY: ! HELP-FC1-NEXT:OPTIONS: @@ -147,7 +141,4 @@ ! HELP-FC1-NEXT: -version Print the compiler version ! HELP-FC1-NEXT: -W Enable the specified warning -!--------------- -! EXPECTED ERROR -!--------------- ! ERROR: error: unknown argument '-helps'; did you mean '-help' diff --git a/flang/test/Driver/driver-version.f90 b/flang/test/Driver/driver-version.f90 index e38a1e58b60b..44c5b8a93182 100644 --- a/flang/test/Driver/driver-version.f90 +++ b/flang/test/Driver/driver-version.f90 @@ -1,15 +1,9 @@ -!----------- -! RUN LINES -!----------- ! RUN: %flang --version 2>&1 | FileCheck %s --check-prefix=VERSION ! RUN: not %flang --versions 2>&1 | FileCheck %s --check-prefix=ERROR ! RUN: %flang_fc1 -version 2>&1 | FileCheck %s --check-prefix=VERSION-FC1 ! RUN: not %flang_fc1 --version 2>&1 | FileCheck %s --check-prefix=ERROR-FC1 -!----------------------- -! EXPECTED OUTPUT -!----------------------- ! VERSION: flang-new version ! VERSION-NEXT: Target: ! VERSION-NEXT: Thread model: diff --git a/flang/test/Driver/dump-all-bad.f90 b/flang/test/Driver/dump-all-bad.f90 index f29ab240936f..2d6f71a526af 100644 --- a/flang/test/Driver/dump-all-bad.f90 +++ b/flang/test/Driver/dump-all-bad.f90 @@ -5,16 +5,10 @@ !---------- ! RUN: not %flang_fc1 -fdebug-dump-all %s 2>&1 | FileCheck %s -!---------------- -! EXPECTED OUTPUT -!---------------- ! CHECK: error: Semantic errors in ! CHECK: Flang: parse tree dump ! CHECK: Flang: symbols dump -!------- -! INPUT -!------- program bad real,pointer :: x x = null() ! Error - must be pointer assignment diff --git a/flang/test/Driver/dump-all.f90 b/flang/test/Driver/dump-all.f90 index 2d209ce4209c..9c2c3bd78715 100644 --- a/flang/test/Driver/dump-all.f90 +++ b/flang/test/Driver/dump-all.f90 @@ -4,15 +4,9 @@ !---------- ! RUN: %flang_fc1 -fdebug-dump-all %s 2>&1 | FileCheck %s -!---------------- -! EXPECTED OUTPUT -!---------------- ! CHECK: Flang: parse tree dump ! CHECK: Flang: symbols dump -!------- -! INPUT -!------- parameter(i=1) integer :: j end program diff --git a/flang/test/Driver/dump-parse-tree-no-sema.f90 b/flang/test/Driver/dump-parse-tree-no-sema.f90 index 7179b1d4174e..8e2ed457e4d3 100644 --- a/flang/test/Driver/dump-parse-tree-no-sema.f90 +++ b/flang/test/Driver/dump-parse-tree-no-sema.f90 @@ -4,9 +4,6 @@ ! RUN: %flang_fc1 -fdebug-dump-parse-tree %s 2>&1 | FileCheck %s --check-prefix=SEMA_ON ! RUN: %flang_fc1 -fdebug-dump-parse-tree-no-sema %s 2>&1 | FileCheck %s --check-prefix=SEMA_OFF -!----------------- -! EXPECTEED OUTPUT -!----------------- ! SEMA_ON: | | | NamedConstant -> Name = 'i' ! SEMA_ON-NEXT: | | | Constant -> Expr = '1_4' ! SEMA_ON-NEXT: | | | | LiteralConstant -> IntLiteralConstant = '1' @@ -14,9 +11,6 @@ ! SEMA_OFF: | | | NamedConstant -> Name = 'i' ! SEMA_OFF-NEXT: | | | Constant -> Expr -> LiteralConstant -> IntLiteralConstant = '1' -!------- -! INPUT -!------- parameter(i=1) integer :: j end program diff --git a/flang/test/Driver/emit-llvm.f90 b/flang/test/Driver/emit-llvm.f90 index c62680d6b5fb..8e864421529e 100644 --- a/flang/test/Driver/emit-llvm.f90 +++ b/flang/test/Driver/emit-llvm.f90 @@ -3,20 +3,11 @@ ! UNSUPPORTED: system-windows ! Windows is currently not supported in flang/lib/Optimizer/CodeGen/Target.cpp -!------------ -! RUN COMMAND -!------------ ! RUN: %flang_fc1 -emit-llvm %s -o - | FileCheck %s -!---------------- -! EXPECTED OUTPUT -!---------------- ! CHECK: ; ModuleID = 'FIRModule' ! CHECK: define void @_QQmain() ! CHECK-NEXT: ret void ! CHECK-NEXT: } -!------ -! INPUT -!------ end program diff --git a/flang/test/Driver/escaped-backslash.f90 b/flang/test/Driver/escaped-backslash.f90 index 16cf2654e2aa..ad07eae24e9f 100644 --- a/flang/test/Driver/escaped-backslash.f90 +++ b/flang/test/Driver/escaped-backslash.f90 @@ -14,16 +14,10 @@ ! RUN: %flang_fc1 -E -fbackslash -fno-backslash %s 2>&1 | FileCheck %s --check-prefix=ESCAPED ! RUN: %flang_fc1 -E -fbackslash %s 2>&1 | FileCheck %s --check-prefix=UNESCAPED -!----------------------------------------- -! EXPECTED OUTPUT FOR ESCAPED BACKSLASHES -!----------------------------------------- ! ESCAPED:program Backslash ! ESCAPED-NEXT:New\\nline ! ESCAPED-NOT:New\nline -!------------------------------------------- -! EXPECTED OUTPUT FOR UNESCAPED BACKSLASHES -!------------------------------------------- ! UNESCAPED:program Backslash ! UNESCAPED-NEXT:New\nline ! UNESCAPED-NOT:New\\nline diff --git a/flang/test/Driver/fdefault.f90 b/flang/test/Driver/fdefault.f90 index 29c11ad78af6..88592bfa3e87 100644 --- a/flang/test/Driver/fdefault.f90 +++ b/flang/test/Driver/fdefault.f90 @@ -23,30 +23,18 @@ ! RUN: cat %t/dir-flang-new/m.mod | FileCheck %s --check-prefix=DOUBLE8 ! RUN: not %flang_fc1 -fsyntax-only -fdefault-double-8 %s 2>&1 | FileCheck %s --check-prefix=ERROR -!----------------------------------------- -! EXPECTED OUTPUT FOR NO SPECIFICATION -!----------------------------------------- ! NOOPTION: integer(4),parameter::real_kind=4_4 ! NOOPTION-NEXT: intrinsic::kind ! NOOPTION-NEXT: integer(4),parameter::double_kind=8_4 -!------------------------------------------- -! EXPECTED OUTPUT FOR ONLY -fdefault-real-8 -!------------------------------------------- ! REAL8: integer(4),parameter::real_kind=8_4 ! REAL8-NEXT: intrinsic::kind ! REAL8-NEXT: integer(4),parameter::double_kind=16_4 -!------------------------------------------------------------- -! EXPECTED OUTPUT FOR -fdefault-real-8 AND -fdefault-double-8 -!------------------------------------------------------------- ! DOUBLE8: integer(4),parameter::real_kind=8_4 ! DOUBLE8-NEXT: intrinsic::kind ! DOUBLE8-NEXT: integer(4),parameter::double_kind=8_4 -!------------------------------------------------------ -! EXPECTED OUTPUT FOR PROVIDING ONLY -fdefault-double-8 -!------------------------------------------------------ ! ERROR: Use of `-fdefault-double-8` requires `-fdefault-real-8` module m diff --git a/flang/test/Driver/fixed-free-detection.f90 b/flang/test/Driver/fixed-free-detection.f90 index bdca422a04b6..c2deef73f39a 100644 --- a/flang/test/Driver/fixed-free-detection.f90 +++ b/flang/test/Driver/fixed-free-detection.f90 @@ -16,21 +16,12 @@ ! RUN: %flang_fc1 -E -fno-reformat %S/Inputs/fixed-form-test.f 2>&1 | FileCheck %s --check-prefix=FIXEDFORM ! RUN: %flang_fc1 -E -fno-reformat %S/Inputs/free-form-test.f90 %S/Inputs/fixed-form-test.f 2>&1 | FileCheck %s --check-prefix=MULTIPLEFORMS -!------------------------------------- -! EXPECTED OUTPUT FOR A FREE FORM FILE -!------------------------------------- ! FREEFORM:program freeform ! FREEFORM-NOT:programfixedform -!--------------------------------------- -! EXPECTED OUTPUT FOR A FIXED FORM FILE -!--------------------------------------- ! FIXEDFORM:programfixedform ! FIXEDFORM-NOT:program freeform -!------------------------------------------------ -! EXPECTED OUTPUT FOR 2 FILES OF DIFFERENT FORMS -!------------------------------------------------ ! MULTIPLEFORMS:program freeform ! MULTIPLEFORMS-NOT:programfixedform ! MULTIPLEFORMS-NEXT:end diff --git a/flang/test/Driver/fixed-free-flag.f90 b/flang/test/Driver/fixed-free-flag.f90 index b57e1c355465..454d642114d3 100644 --- a/flang/test/Driver/fixed-free-flag.f90 +++ b/flang/test/Driver/fixed-free-flag.f90 @@ -12,12 +12,6 @@ ! RUN: not %flang_fc1 -fsyntax-only -ffree-form %S/Inputs/fixed-form-test.f 2>&1 | FileCheck %s --check-prefix=FREEFORM ! RUN: %flang_fc1 -fsyntax-only -ffixed-form %S/Inputs/free-form-test.f90 2>&1 | FileCheck %s --check-prefix=FIXEDFORM -!------------------------------------ -! EXPECTED OUTPUT FOR FREE FORM MODE -!------------------------------------ ! FREEFORM: Could not parse -!------------------------------------- -! EXPECTED OUTPUT FOR FIXED FORM MODE -!------------------------------------- ! FIXEDFORM:free-form-test.f90:1:1: warning: Character in fixed-form label field must be a digit diff --git a/flang/test/Driver/fixed-line-length.f90 b/flang/test/Driver/fixed-line-length.f90 index be55280de4a5..879b7de7089e 100644 --- a/flang/test/Driver/fixed-line-length.f90 +++ b/flang/test/Driver/fixed-line-length.f90 @@ -26,29 +26,14 @@ ! RUN: %flang -E -Xflang -fno-reformat -ffixed-line-length-13 %S/Inputs/fixed-line-length-test.f 2>&1 | FileCheck %s --check-prefix=LENGTH13 ! RUN: %flang_fc1 -E -fno-reformat -ffixed-line-length-13 %S/Inputs/fixed-line-length-test.f 2>&1 | FileCheck %s --check-prefix=LENGTH13 -!------------------------------------- -! EXPECTED OUTPUT WITH DEFAULT LENGTH -!------------------------------------- ! The line should be trimmed to 72 characters when reading based on the default value of fixed line length. ! DEFAULTLENGTH: program{{(a{58})}} -!----------------------------------------- -! EXPECTED OUTPUT WITH A NEGATIVE LENGTH -!----------------------------------------- ! NEGATIVELENGTH: invalid value '-2' in 'ffixed-line-length=', value must be 'none' or a positive integer -!----------------------------------------- -! EXPECTED OUTPUT WITH LENGTH LESS THAN 7 -!----------------------------------------- ! INVALIDLENGTH: invalid value '3' in 'ffixed-line-length=', value must be '7' or greater -!--------------------------------------- -! EXPECTED OUTPUT WITH UNLIMITED LENGTH -!--------------------------------------- ! The line should not be trimmed and so 73 characters (including spaces) should be read. ! UNLIMITEDLENGTH: program{{(a{59})}} -!-------------------------------- -! EXPECTED OUTPUT WITH LENGTH 13 -!-------------------------------- ! LENGTH13: program diff --git a/flang/test/Driver/flang_f_opts.f90 b/flang/test/Driver/flang_f_opts.f90 index d06e2a342d7d..a0544d653104 100644 --- a/flang/test/Driver/flang_f_opts.f90 +++ b/flang/test/Driver/flang_f_opts.f90 @@ -1,14 +1,8 @@ ! Test for warnings generated when parsing driver options. You can use this file for relatively small tests and to avoid creating ! new test files. -!----------- -! RUN LINES -!----------- ! RUN: %flang -### -S -O4 %s 2>&1 | FileCheck %s -!----------------------- -! EXPECTED OUTPUT -!----------------------- ! CHECK: warning: -O4 is equivalent to -O3 ! CHECK-LABEL: "-fc1" ! CHECK: -O3 diff --git a/flang/test/Driver/flarge-sizes.f90 b/flang/test/Driver/flarge-sizes.f90 index 4af9e2b5c75b..6ea5876676ed 100644 --- a/flang/test/Driver/flarge-sizes.f90 +++ b/flang/test/Driver/flarge-sizes.f90 @@ -17,15 +17,9 @@ ! RUN: rm -rf %t/dir-flang-new && mkdir -p %t/dir-flang-new && %flang_fc1 -fsyntax-only -flarge-sizes -module-dir %t/dir-flang-new %s 2>&1 ! RUN: cat %t/dir-flang-new/m.mod | FileCheck %s --check-prefix=LARGE -!----------------------------------------- -! EXPECTED OUTPUT WITHOUT -flarge-sizes -!----------------------------------------- ! NOLARGE: real(4)::z(1_8:10_8) ! NOLARGE-NEXT: integer(4),parameter::size_kind=4_4 -!----------------------------------------- -! EXPECTED OUTPUT FOR -flarge-sizes -!----------------------------------------- ! LARGE: real(4)::z(1_8:10_8) ! LARGE-NEXT: integer(4),parameter::size_kind=8_4 diff --git a/flang/test/Driver/get-definition.f90 b/flang/test/Driver/get-definition.f90 index f8cf92692049..b0de3c7c45ca 100644 --- a/flang/test/Driver/get-definition.f90 +++ b/flang/test/Driver/get-definition.f90 @@ -1,9 +1,6 @@ ! Verify that the driver correctly rejects invalid values for -fget-definition -!----------- -! RUN LINES -!----------- -! RUN: not %flang_fc1 -fget-definition 45 1 2 %s 2>&1 | FileCheck --check-prefix=OK %s +! RUN: not %flang_fc1 -fget-definition 36 1 2 %s 2>&1 | FileCheck --check-prefix=OK %s ! RUN: not %flang_fc1 -fget-definition a 1 1 %s 2>&1 | FileCheck --check-prefix=ERROR-a %s ! RUN: not %flang_fc1 -fget-definition 1 b 1 %s 2>&1 | FileCheck --check-prefix=ERROR-b %s ! RUN: not %flang_fc1 -fget-definition 1 1 c %s 2>&1 | FileCheck --check-prefix=ERROR-c %s @@ -12,9 +9,6 @@ ! RUN: not %flang_fc1 -fget-definition 1 b c %s 2>&1 | FileCheck --check-prefix=ERROR-bc %s ! RUN: not %flang_fc1 -fget-definition a 1 c %s 2>&1 | FileCheck --check-prefix=ERROR-ac %s -!----------------- -! EXPECTED OUTPUT -!----------------- ! OK: String range: >m< ! OK-NOT: error @@ -39,8 +33,5 @@ ! ERROR-abc: error: invalid value 'a' in 'fget-definition' ! ERROR-abc-NOT: String range: >m< -!------- -! INPUT -!------- module m end module diff --git a/flang/test/Driver/implicit-none.f90 b/flang/test/Driver/implicit-none.f90 index 98d6c06f8d72..68e87ed91f8c 100644 --- a/flang/test/Driver/implicit-none.f90 +++ b/flang/test/Driver/implicit-none.f90 @@ -14,14 +14,8 @@ ! RUN: %flang_fc1 -fsyntax-only -fimplicit-none -fno-implicit-none %s 2>&1 | FileCheck %s --allow-empty --check-prefix=DEFAULT ! RUN: not %flang_fc1 -fsyntax-only -fimplicit-none %s 2>&1 | FileCheck %s --check-prefix=WITH_IMPL_NONE -!-------------------------------------- -! EXPECTED OUTPUT FOR NO IMPLICIT NONE -!-------------------------------------- ! DEFAULT-NOT:error -!------------------------------------------ -! EXPECTED OUTPUT FOR IMPLICIT NONE ALWAYS -!------------------------------------------ ! WITH_IMPL_NONE:No explicit type declared for 'a' ! WITH_IMPL_NONE:No explicit type declared for 'b' diff --git a/flang/test/Driver/include-header.f90 b/flang/test/Driver/include-header.f90 index 672f1b0ad740..789d99526d36 100644 --- a/flang/test/Driver/include-header.f90 +++ b/flang/test/Driver/include-header.f90 @@ -16,16 +16,10 @@ ! RUN: %flang_fc1 -E -I %S/Inputs -I %S/Inputs/header-dir %s 2>&1 | FileCheck %s --check-prefix=MAINDIRECTORY ! RUN: %flang_fc1 -E -I %S/Inputs/header-dir -I %S/Inputs %s 2>&1 | FileCheck %s --check-prefix=SUBDIRECTORY -!-------------------------------------------- -! EXPECTED OUTPUT FOR MISSING INCLUDED FILE -!-------------------------------------------- ! UNINCLUDED:#include: Source file 'basic-header-one.h' was not found ! UNINCLUDED-NOT:program b ! UNINCLUDED-NOT:program c -!--------------------------------------------- -! EXPECTED OUTPUT FOR A SINGLE INCLUDED FOLDER -!-------------------------------------------- ! SINGLEINCLUDE:program MainDirectoryOne ! SINGLEINCLUDE-NOT:program X ! SINGLEINCLUDE-NOT:program B @@ -33,9 +27,6 @@ ! SINGLEINCLUDE-NOT:program Y ! SINGLEINCLUDE-NOT:program C -!------------------------------------------------------- -! EXPECTED OUTPUT FOR Inputs/ DIRECTORY SPECIFIED FIRST -!------------------------------------------------------- ! MAINDIRECTORY:program MainDirectoryOne ! MAINDIRECTORY-NOT:program SubDirectoryOne ! MAINDIRECTORY-NOT:program B @@ -43,9 +34,6 @@ ! MAINDIRECTORY-NOT:program SubDirectoryTwo ! MAINDIRECTORY-NOT:program C -!------------------------------------------------------------------ -! EXPECTED OUTPUT FOR Inputs/header-dir/ DIRECTORY SPECIFIED FIRST -!------------------------------------------------------------------ ! SUBDIRECTORY:program SubDirectoryOne ! SUBDIRECTORY-NOT:program MainDirectoryOne ! SUBDIRECTORY-NOT:program B diff --git a/flang/test/Driver/include-omp-header.f90 b/flang/test/Driver/include-omp-header.f90 index e62cb64657a4..4bf43bbc882b 100644 --- a/flang/test/Driver/include-omp-header.f90 +++ b/flang/test/Driver/include-omp-header.f90 @@ -5,9 +5,6 @@ ! source file takes precedence over other search paths. Hence adding omp_lib.h in the current directory will make Flang use that ! header file instead of the one shipped with Flang. -!---------- -! RUN LINES -!---------- ! This should just work ! RUN: not rm omp_lib.h ! RUN: %flang -fsyntax-only -fopenmp %s 2>&1 @@ -17,14 +14,8 @@ ! RUN: not %flang -fsyntax-only -fopenmp %s 2>&1 | FileCheck %s ! RUN: rm omp_lib.h -!-------------------------- -! EXPECTED OUTPUT -!-------------------------- ! CHECK: error: Must have INTEGER type, but is REAL(4) -!------- -! INPUT -!------- include "omp_lib.h" integer :: x, y diff --git a/flang/test/Driver/input-from-stdin-llvm.ll b/flang/test/Driver/input-from-stdin-llvm.ll index b223c85bea8c..4991fc8aa41d 100644 --- a/flang/test/Driver/input-from-stdin-llvm.ll +++ b/flang/test/Driver/input-from-stdin-llvm.ll @@ -2,9 +2,6 @@ ; REQUIRES: aarch64-registered-target -;---------- -; RUN LINES -;---------- ; Input type is implicit - assumed to be Fortran. As the input is provided via ; stdin, the file extension is not relevant here. ; RUN: cat %s | not %flang -S - -o - @@ -14,15 +11,9 @@ ; RUN: cat %s | %flang -x ir -S -target aarch64-unknown-linux-gnu - -o - | FileCheck %s ; RUN: cat %s | %flang_fc1 -x ir -S -triple aarch64-unknown-linux-gnu - -o - | FileCheck %s -;---------------- -; EXPECTED OUTPUT -;---------------- ; CHECK-LABEL: foo: ; CHECK: ret -;------ -; INPUT -;------ define void @foo() { ret void } diff --git a/flang/test/Driver/input-from-stdin.f90 b/flang/test/Driver/input-from-stdin.f90 index 58bf03b46f21..a1f5fca99705 100644 --- a/flang/test/Driver/input-from-stdin.f90 +++ b/flang/test/Driver/input-from-stdin.f90 @@ -25,15 +25,9 @@ ! RUN: cat %s | %flang -fc1 -test-io -cpp | FileCheck %s --check-prefix=IO --match-full-lines ! RUN: cat %s | %flang -fc1 -DNEW -cpp -test-io | FileCheck %s --check-prefix=IO --match-full-lines -!------------------------- -! EXPECTED OUTPUT for `-E` -!------------------------- ! PP-NOT-DEFINED: Program B ! PP-DEFINED: Program A -!------------------------------- -! EXPECTED OUTPUT for `-test-io` -!------------------------------- ! IO: #ifdef NEW ! IO-NEXT: Program A ! IO-NEXT: #else diff --git a/flang/test/Driver/intrinsic-module-path.f90 b/flang/test/Driver/intrinsic-module-path.f90 index 1105220b8456..5523ed37b724 100644 --- a/flang/test/Driver/intrinsic-module-path.f90 +++ b/flang/test/Driver/intrinsic-module-path.f90 @@ -9,15 +9,9 @@ ! RUN: %flang_fc1 -fsyntax-only %s 2>&1 | FileCheck %s --allow-empty --check-prefix=WITHOUT ! RUN: not %flang_fc1 -fsyntax-only -fintrinsic-modules-path %S/Inputs/ %s 2>&1 | FileCheck %s --check-prefix=GIVEN -!----------------------------------------- -! EXPECTED OUTPUT WITHOUT -!----------------------------------------- ! WITHOUT-NOT: 'ieee_arithmetic.mod' was not found ! WITHOUT-NOT: 'iso_fortran_env.mod' was not found -!----------------------------------------- -! EXPECTED OUTPUT WITH -!----------------------------------------- ! GIVEN: error: Cannot read module file for module 'ieee_arithmetic': File has invalid checksum ! GIVEN: error: Cannot read module file for module 'iso_fortran_env': File has invalid checksum diff --git a/flang/test/Driver/macro-def-undef.F90 b/flang/test/Driver/macro-def-undef.F90 index 59b79bc445d4..1332c6d6c027 100644 --- a/flang/test/Driver/macro-def-undef.F90 +++ b/flang/test/Driver/macro-def-undef.F90 @@ -14,15 +14,9 @@ ! RUN: %flang_fc1 -E -P -DX=A %s 2>&1 | FileCheck %s --check-prefix=DEFINED ! RUN: %flang_fc1 -E -P -DX -UX %s 2>&1 | FileCheck %s --check-prefix=UNDEFINED -!-------------------------------------------- -! EXPECTED OUTPUT FOR AN UNDEFINED MACRO -!-------------------------------------------- ! UNDEFINED:program B ! UNDEFINED-NOT:program X -!-------------------------------------------- -! EXPECTED OUTPUT FOR MACRO 'X' DEFINED AS A -!-------------------------------------------- ! DEFINED:program A ! DEFINED-NOT:program B diff --git a/flang/test/Driver/macro-multiline.F90 b/flang/test/Driver/macro-multiline.F90 index 7703885971e9..f3d1cc9399f0 100644 --- a/flang/test/Driver/macro-multiline.F90 +++ b/flang/test/Driver/macro-multiline.F90 @@ -10,9 +10,6 @@ !----------------------------------------- ! RUN: printf -- "-DX=A\\\\\nTHIS_SHOULD_NOT_EXIST_IN_THE_OUTPUT\n" | xargs %flang_fc1 -E -P %s 2>&1 | FileCheck --strict-whitespace --match-full-lines %s -!------------------------------- -! EXPECTED OUTPUT FOR MACRO 'X' -!------------------------------- ! CHECK: START A END ! CHECK-NOT:THIS_SHOULD_NOT_EXIST_IN_THE_OUTPUT ! CHECK-NOT:this_should_not_exist_in_the_output diff --git a/flang/test/Driver/missing-arg.f90 b/flang/test/Driver/missing-arg.f90 index 157fd9d0976d..1dca2b9a9f08 100644 --- a/flang/test/Driver/missing-arg.f90 +++ b/flang/test/Driver/missing-arg.f90 @@ -13,7 +13,4 @@ ! RUN: not %flang_fc1 -E %s -module-suffix 2>&1 | FileCheck %s ! RUN: not %flang_fc1 -E %s -fintrinsic-modules-path 2>&1 | FileCheck %s -!----------------------- -! EXPECTED OUTPUT -!----------------------- ! CHECK: error: argument to '-{{.*}}' is missing (expected 1 value) diff --git a/flang/test/Driver/missing-input.f90 b/flang/test/Driver/missing-input.f90 index 44ee6d8cee15..236325e3578f 100644 --- a/flang/test/Driver/missing-input.f90 +++ b/flang/test/Driver/missing-input.f90 @@ -17,9 +17,6 @@ ! RUN: not %flang_fc1 %t.f90 2>&1 | FileCheck %s --check-prefix=FLANG-FC1-NONEXISTENT-FILE ! RUN: not %flang_fc1 %S 2>&1 | FileCheck %s --check-prefix=FLANG-FC1-DIR -!----------------------- -! EXPECTED OUTPUT -!----------------------- ! FLANG-NO-FILE: flang-new: error: no input files ! FLANG-NONEXISTENT-FILE: flang-new: error: no such file or directory: {{.*}} diff --git a/flang/test/Driver/mllvm.f90 b/flang/test/Driver/mllvm.f90 index 101501a6d3dd..badcede7cf1c 100644 --- a/flang/test/Driver/mllvm.f90 +++ b/flang/test/Driver/mllvm.f90 @@ -1,8 +1,5 @@ ! Test the `-mllvm` option -!------------ -! RUN COMMAND -!------------ ! 1. Test typical usage. ! RUN: %flang -S -mllvm -print-before-all %s -o - 2>&1 | FileCheck %s --check-prefix=OUTPUT ! RUN: %flang_fc1 -S -mllvm -print-before-all %s -o - 2>&1 | FileCheck %s --check-prefix=OUTPUT @@ -10,16 +7,10 @@ ! 2. Test invalid usage (`-print-before` requires an argument) ! RUN: not %flang -S -mllvm -print-before %s -o - 2>&1 | FileCheck %s --check-prefix=INVALID_USAGE -!---------------- -! EXPECTED OUTPUT -!---------------- ! OUTPUT: *** IR Dump Before Pre-ISel Intrinsic Lowering (pre-isel-intrinsic-lowering) *** ! OUTPUT-NEXT: ; ModuleID = 'FIRModule' ! OUTPUT-NEXT: source_filename = "FIRModule" ! INVALID_USAGE: flang (LLVM option parsing): for the --print-before option: requires a value! -!------ -! INPUT -!------ end program diff --git a/flang/test/Driver/mllvm_vs_mmlir.f90 b/flang/test/Driver/mllvm_vs_mmlir.f90 index bb8a2cb82d51..99c3418dc6a1 100644 --- a/flang/test/Driver/mllvm_vs_mmlir.f90 +++ b/flang/test/Driver/mllvm_vs_mmlir.f90 @@ -3,15 +3,9 @@ ! In practice, '-mmlir --help' is a super-set of '-mllvm --help' and that limits what we can test here. With a better seperation of ! LLVM, MLIR and Flang global options, we should be able to write a stricter test. -!------------ -! RUN COMMAND -!------------ ! RUN: %flang_fc1 -mmlir --help | FileCheck %s --check-prefix=MLIR ! RUN: %flang_fc1 -mllvm --help | FileCheck %s --check-prefix=MLLVM -!---------------- -! EXPECTED OUTPUT -!---------------- ! MLIR: flang (MLIR option parsing) [options] ! MLIR: --mlir-{{.*}} diff --git a/flang/test/Driver/module-suffix.f90 b/flang/test/Driver/module-suffix.f90 index 151688492c93..df88ccef9bd0 100644 --- a/flang/test/Driver/module-suffix.f90 +++ b/flang/test/Driver/module-suffix.f90 @@ -7,9 +7,6 @@ ! RUN: cd %t && %flang_fc1 -fsyntax-only -module-suffix .f18.mod -module-dir %t/dir-flang %s ! RUN: ls %t/dir-flang/testmodule.f18.mod && not ls %t/dir-flang/testmodule.mod -!-------------------------- -! INPUT -!-------------------------- module testmodule type::t2 end type diff --git a/flang/test/Driver/output-paths.f90 b/flang/test/Driver/output-paths.f90 index 394425fb4310..8281d15bad47 100644 --- a/flang/test/Driver/output-paths.f90 +++ b/flang/test/Driver/output-paths.f90 @@ -6,7 +6,4 @@ ! RUN: not %flang_fc1 -E -o %t.doesnotexist/somename %s 2> %t ! RUN: FileCheck -check-prefix=OUTPUTFAIL -DMSG=%errc_ENOENT -input-file=%t %s -!----------------------- -! EXPECTED OUTPUT -!----------------------- ! OUTPUTFAIL: error: unable to open output file '{{.*}}doesnotexist{{.}}somename': '[[MSG]]' diff --git a/flang/test/Driver/parse-error.ll b/flang/test/Driver/parse-error.ll index 374b218fc098..3567c3e3f0a3 100644 --- a/flang/test/Driver/parse-error.ll +++ b/flang/test/Driver/parse-error.ll @@ -2,9 +2,6 @@ ; Fortran (with the `-x` flag). This way we verify that the driver ; correctly rejects invalid Fortran input. -;---------- -; RUN LINES -;---------- ; Input type is implicit (correctly assumed to be LLVM IR) ; RUN: %flang_fc1 -S %s -o - diff --git a/flang/test/Driver/parse-fir-error.ll b/flang/test/Driver/parse-fir-error.ll index e2ac4797aa6b..146fc7884902 100644 --- a/flang/test/Driver/parse-fir-error.ll +++ b/flang/test/Driver/parse-fir-error.ll @@ -2,9 +2,6 @@ ; FIR (with the `-x` flag). This way we verify that the driver ; correctly rejects invalid FIR input. -;---------- -; RUN LINES -;---------- ; Input type is implicit (correctly assumed to be LLVM IR) ; RUN: %flang_fc1 -S %s -o - diff --git a/flang/test/Driver/parse-ir-error.f95 b/flang/test/Driver/parse-ir-error.f95 index 1c8b205196fc..c52fd5172fd6 100644 --- a/flang/test/Driver/parse-ir-error.f95 +++ b/flang/test/Driver/parse-ir-error.f95 @@ -2,17 +2,11 @@ ! LLVM file (with the `-x` flag). This way we verify that the driver correctly ! rejects invalid LLVM IR input. -!---------- -! RUN LINES -!---------- ! Input type is implicit (correctly assumed to be Fortran) ! RUN: %flang_fc1 -S -o /dev/null %s ! Input type is explicitly set as LLVM IR ! RUN: not %flang -S -x ir %s 2>&1 | FileCheck %s -!---------------- -! EXPECTED OUTPUT -!---------------- ! CHECK: error: Could not parse IR end program diff --git a/flang/test/Driver/phases.f90 b/flang/test/Driver/phases.f90 index eeaed03dc6f1..b688600dae03 100644 --- a/flang/test/Driver/phases.f90 +++ b/flang/test/Driver/phases.f90 @@ -1,15 +1,9 @@ ! This test verifies the phase control in Flang compiler driver. -!----------- -! RUN LINES -!----------- ! RUN: %flang -E -ccc-print-phases %s 2>&1 | FileCheck %s --check-prefix=PP ! RUN: %flang -fsyntax-only -ccc-print-phases %s 2>&1 | FileCheck %s --check-prefix=COMPILE ! RUN: %flang -c -ccc-print-phases %s 2>&1 | FileCheck %s --check-prefix=EMIT_OBJ -!----------------------- -! EXPECTED OUTPUT -!----------------------- ! PP: +- 0: input, "{{.*}}phases.f90", f95-cpp-input ! PP-NEXT: 1: preprocessor, {0}, f95 diff --git a/flang/test/Driver/pic-flags.f90 b/flang/test/Driver/pic-flags.f90 index 4e6b9796cb4a..99a87c747801 100644 --- a/flang/test/Driver/pic-flags.f90 +++ b/flang/test/Driver/pic-flags.f90 @@ -1,16 +1,10 @@ ! Verify that in contrast to Clang, Flang does not default to generating position independent executables/code -!------------- -! RUN COMMANDS -!------------- ! RUN: %flang -### %s --target=aarch64-linux-gnu 2>&1 | FileCheck %s --check-prefix=CHECK-NOPIE ! RUN: %flang -### %s --target=aarch64-linux-gnu -fno-pie 2>&1 | FileCheck %s --check-prefix=CHECK-NOPIE ! RUN: %flang -### %s --target=aarch64-linux-gnu -fpie 2>&1 | FileCheck %s --check-prefix=CHECK-PIE -!---------------- -! EXPECTED OUTPUT -!---------------- ! CHECK-NOPIE: "-fc1" ! CHECk-NOPIE-NOT: "-fpic" ! CHECK-NOPIE: "{{.*}}ld" diff --git a/flang/test/Driver/predefined-macros-compiler-version.F90 b/flang/test/Driver/predefined-macros-compiler-version.F90 index e395b1a58078..823a730f9684 100644 --- a/flang/test/Driver/predefined-macros-compiler-version.F90 +++ b/flang/test/Driver/predefined-macros-compiler-version.F90 @@ -10,9 +10,6 @@ !----------------------------------------- ! RUN: %flang_fc1 -E %s 2>&1 | FileCheck %s --ignore-case -!----------------- -! EXPECTED OUTPUT -!----------------- ! CHECK: flang = 1 ! CHECK: flang_major = {{[1-9][0-9]*$}} ! CHECK: flang_minor = {{[0-9]+$}} diff --git a/flang/test/Driver/print-effective-triple.f90 b/flang/test/Driver/print-effective-triple.f90 index 5f53d5f1aee5..5b32de96e93a 100644 --- a/flang/test/Driver/print-effective-triple.f90 +++ b/flang/test/Driver/print-effective-triple.f90 @@ -1,11 +1,5 @@ ! Test that -print-target-triple prints correct triple. -!----------------------------------------- -! RUN LINE -!----------------------------------------- ! RUN: %flang -print-effective-triple 2>&1 --target=thumb-linux-gnu | FileCheck %s -!----------------- -! EXPECTED OUTPUT -!----------------- ! CHECK: armv4t-unknown-linux-gnu diff --git a/flang/test/Driver/print-target-triple.f90 b/flang/test/Driver/print-target-triple.f90 index 1a73af6ec633..e07ebdf56467 100644 --- a/flang/test/Driver/print-target-triple.f90 +++ b/flang/test/Driver/print-target-triple.f90 @@ -1,16 +1,10 @@ ! Test that -print-target-triple prints correct triple -!----------------------------------------- -! RUN LINES -!----------------------------------------- ! RUN: %flang -print-target-triple 2>&1 --target=aarch64-linux-gnu \ ! RUN: | FileCheck --check-prefix=AARCH64 %s ! RUN: %flang -print-target-triple 2>&1 --target=x86_64-linux-gnu \ ! RUN: | FileCheck --check-prefix=X86_64 %s -!----------------- -! EXPECTED OUTPUT -!----------------- ! X86_64: x86_64-unknown-linux-gnu ! AARCH64: aarch64-unknown-linux-gnu diff --git a/flang/test/Driver/std2018-wrong.f90 b/flang/test/Driver/std2018-wrong.f90 index b896417680c8..27ccc76bd39a 100644 --- a/flang/test/Driver/std2018-wrong.f90 +++ b/flang/test/Driver/std2018-wrong.f90 @@ -5,7 +5,4 @@ !----------------------------------------- ! RUN: not %flang_fc1 -std=90 %s 2>&1 | FileCheck %s --check-prefix=WRONG -!----------------------------------------- -! EXPECTED OUTPUT WITH WRONG -!----------------------------------------- ! WRONG: Only -std=f2018 is allowed currently. diff --git a/flang/test/Driver/std2018.f90 b/flang/test/Driver/std2018.f90 index acc063e5fe4b..cf461cf89e4e 100644 --- a/flang/test/Driver/std2018.f90 +++ b/flang/test/Driver/std2018.f90 @@ -7,14 +7,8 @@ ! RUN: %flang_fc1 -fsyntax-only -std=f2018 %s 2>&1 | FileCheck %s --check-prefix=GIVEN ! RUN: %flang_fc1 -fsyntax-only -pedantic %s 2>&1 | FileCheck %s --check-prefix=GIVEN -!----------------------------------------- -! EXPECTED OUTPUT WITHOUT -!----------------------------------------- ! WITHOUT-NOT: A DO loop should terminate with an END DO or CONTINUE -!----------------------------------------- -! EXPECTED OUTPUT WITH -!----------------------------------------- ! GIVEN: A DO loop should terminate with an END DO or CONTINUE subroutine foo2() diff --git a/flang/test/Driver/syntax-only.f90 b/flang/test/Driver/syntax-only.f90 index df831e09684f..18f068ada2b3 100644 --- a/flang/test/Driver/syntax-only.f90 +++ b/flang/test/Driver/syntax-only.f90 @@ -7,9 +7,6 @@ ! runs `-fsyntax-only` by default (i.e. that's the default action), so the flag ! can be skipped. -!----------- -! RUN LINES -!----------- ! RUN: %flang -fsyntax-only %s 2>&1 | FileCheck %s --allow-empty ! RUN: %flang_fc1 %s 2>&1 | FileCheck %s --allow-empty @@ -17,13 +14,7 @@ ! RUN: not %flang -c %s -o %t/non-existent-dir/syntax-only.o 2>&1 | FileCheck %s --check-prefix=NO_FSYNTAX_ONLY ! RUN: not %flang_fc1 -emit-obj %s -o %t/non-existent-dir/syntax-only.o 2>&1 | FileCheck %s --check-prefix=NO_FSYNTAX_ONLY -!----------------- -! EXPECTED OUTPUT -!----------------- ! CHECK-NOT: error ! NO_FSYNTAX_ONLY: error: failed to create the output file -!------- -! INPUT -!------- end program diff --git a/flang/test/Driver/target.f90 b/flang/test/Driver/target.f90 index bdcf139e9f4b..c111f39bc38c 100644 --- a/flang/test/Driver/target.f90 +++ b/flang/test/Driver/target.f90 @@ -1,13 +1,7 @@ ! Test that --target indeed sets the target -!----------------------------------------- -! RUN LINES -!----------------------------------------- ! RUN: %flang --target=unknown-unknown-unknown -emit-llvm -c %s \ ! RUN: -o %t.o -### 2>&1 | FileCheck %s -!----------------- -! EXPECTED OUTPUT -!----------------- ! CHECK: Target: unknown-unknown-unknown ! CHECK: "-triple" "unknown-unknown-unknown" diff --git a/flang/test/Driver/unparse-use-analyzed.f95 b/flang/test/Driver/unparse-use-analyzed.f95 index 08410077a2b8..eb6046aebba5 100644 --- a/flang/test/Driver/unparse-use-analyzed.f95 +++ b/flang/test/Driver/unparse-use-analyzed.f95 @@ -6,25 +6,16 @@ ! RUN: %flang_fc1 -fdebug-unparse %s | FileCheck %s --check-prefix=DEFAULT ! RUN: %flang_fc1 -fdebug-unparse -fno-analyzed-objects-for-unparse %s | FileCheck %s --check-prefix=DISABLED -!------------------------------------------------ -! EXPECTED OUTPUT: default - use analyzed objects -!------------------------------------------------ ! DEFAULT: PROGRAM test ! DEFAULT-NEXT: REAL, PARAMETER :: val = 3.43e2_4 ! DEFAULT-NEXT: PRINT *, 3.47e2_4 ! DEFAULT-NEXT: END PROGRAM -!----------------------------------------------------------- -! EXPECTED OUTPUT: disabled - don't use the analyzed objects -!----------------------------------------------------------- ! DISABLED: PROGRAM test ! DISABLED-NEXT: REAL, PARAMETER :: val = 343.0 ! DISABLED-NEXT: PRINT *, val+4 ! DISABLED-NEXT: END PROGRAM -!-------------------------- -! INPUT -!-------------------------- program test real, parameter :: val = 343.0 print *, val + 4 diff --git a/flang/test/Driver/use-module-error.f90 b/flang/test/Driver/use-module-error.f90 index 6834bf52c2b4..42d6650621c8 100644 --- a/flang/test/Driver/use-module-error.f90 +++ b/flang/test/Driver/use-module-error.f90 @@ -14,9 +14,6 @@ ! RUN: not %flang_fc1 -fsyntax-only -J %S/Inputs/module-dir -module-dir %S/Inputs/ %s 2>&1 | FileCheck %s --check-prefix=DOUBLEINCLUDE ! RUN: not %flang_fc1 -fsyntax-only -module-dir %S/Inputs/module-dir -J%S/Inputs/ %s 2>&1 | FileCheck %s --check-prefix=DOUBLEINCLUDE -!----------------------------------------- -! EXPECTED OUTPUT FOR MISSING MODULE FILE -!----------------------------------------- ! DOUBLEINCLUDE:error: Only one '-module-dir/-J' option allowed program too_many_module_dirs diff --git a/flang/test/Driver/use-module.f90 b/flang/test/Driver/use-module.f90 index a481cabf8077..775c04247158 100644 --- a/flang/test/Driver/use-module.f90 +++ b/flang/test/Driver/use-module.f90 @@ -30,22 +30,13 @@ ! RUN: not %flang_fc1 -fsyntax-only -J %S/Inputs/module-dir %s 2>&1 | FileCheck %s --check-prefix=SINGLEINCLUDE ! RUN: not %flang_fc1 -fsyntax-only -module-dir %S/Inputs/module-dir %s 2>&1 | FileCheck %s --check-prefix=SINGLEINCLUDE -!------------------------------------ -! EXPECTED OUTPUT: all modules found -!------------------------------------ ! INCLUDED-NOT: error -!------------------------------------------------------------------ -! EXPECTED OUTPUT: include dir for `basictestingmoduletwo` is missing -!------------------------------------------------------------------ ! MISSING_MOD2-NOT:error: Cannot read module file for module 'basictestmoduleone'' ! MISSING_MOD2-NOT:error: Derived type 't1' not found ! MISSING_MOD2:error: Cannot read module file for module 'basictestmoduletwo' ! MISSING_MOD2:error: Derived type 't2' not found -!---------------------------------------------------------------------- -! EXPECTED OUTPUT: `Inputs` is not included, and hence `t1` is undefined -!--------------------------------------------------------------------- ! SINGLEINCLUDE-NOT:error: Cannot read module file for module 'basictestmoduleone' ! SINGLEINCLUDE:error: Derived type 't1' not found ! SINGLEINCLUDE-NOT:error: Cannot read module file for module 'basictestmoduletwo' diff --git a/flang/test/Driver/werror-parse.f b/flang/test/Driver/werror-parse.f index 466799c0b66e..66d749f6df0f 100644 --- a/flang/test/Driver/werror-parse.f +++ b/flang/test/Driver/werror-parse.f @@ -15,14 +15,8 @@ ! RUN: %flang_fc1 -std=f2018 -fdebug-unparse %s 2>&1 | FileCheck %s --allow-empty --check-prefix=WITHOUT ! RUN: %flang_fc1 -std=f2018 -fdebug-dump-symbols %s 2>&1 | FileCheck %s --allow-empty --check-prefix=WITHOUT -!----------------------------------------- -! EXPECTED OUTPUT WITH -Werror -!----------------------------------------- ! WITH: Could not parse -!----------------------------------------- -! EXPECTED OUTPUT WITHOUT -Werror -!----------------------------------------- ! WITHOUT-NOT: Could not parse #ifndef _OM_NO_IOSTREAM diff --git a/flang/test/Driver/werror-scan.f b/flang/test/Driver/werror-scan.f index deb7967e3cb7..b28169b0c2b9 100644 --- a/flang/test/Driver/werror-scan.f +++ b/flang/test/Driver/werror-scan.f @@ -11,14 +11,8 @@ ! RUN: %flang_fc1 -fdebug-dump-provenance %s 2>&1 | FileCheck %s --check-prefix=WITHOUT ! RUN: %flang_fc1 -fdebug-measure-parse-tree %s 2>&1 | FileCheck %s --check-prefix=WITHOUT -!----------------------------------------- -! EXPECTED OUTPUT WITH -Werror -!----------------------------------------- ! WITH: Could not scan -!----------------------------------------- -! EXPECTED OUTPUT WITHOUT -Werror -!----------------------------------------- ! WITHOUT-NOT: Could not scan 1 continue diff --git a/flang/test/Driver/werror-sema.f90 b/flang/test/Driver/werror-sema.f90 index f6cd167afa3d..67832096bc6b 100644 --- a/flang/test/Driver/werror-sema.f90 +++ b/flang/test/Driver/werror-sema.f90 @@ -15,14 +15,8 @@ ! RUN: %flang_fc1 -fdebug-unparse %s 2>&1 | FileCheck %s --allow-empty --check-prefix=WITHOUT ! RUN: %flang_fc1 -fdebug-dump-symbols %s 2>&1 | FileCheck %s --allow-empty --check-prefix=WITHOUT -!----------------------------------------- -! EXPECTED OUTPUT WITH -Werror -!----------------------------------------- ! WITH: Semantic errors in -!----------------------------------------- -! EXPECTED OUTPUT WITHOUT -Werror -!----------------------------------------- ! WITHOUT-NOT: Semantic errors in PROGRAM werror diff --git a/flang/test/Driver/werror-wrong.f90 b/flang/test/Driver/werror-wrong.f90 index 3151bb165dc9..58adf6f745d5 100644 --- a/flang/test/Driver/werror-wrong.f90 +++ b/flang/test/Driver/werror-wrong.f90 @@ -3,7 +3,4 @@ ! RUN: not %flang_fc1 -fsyntax-only -Wall %s 2>&1 | FileCheck %s --check-prefix=WRONG ! RUN: not %flang_fc1 -fsyntax-only -WX %s 2>&1 | FileCheck %s --check-prefix=WRONG -!----------------------------------------- -! EXPECTED OUTPUT WITH -W -!----------------------------------------- ! WRONG: Only `-Werror` is supported currently.