diff --git a/flang/test/Driver/code-gen.f90 b/flang/test/Driver/code-gen.f90 index 53a1a52be7c04..b806a9ad120f2 100644 --- a/flang/test/Driver/code-gen.f90 +++ b/flang/test/Driver/code-gen.f90 @@ -1,10 +1,3 @@ -! RUN: not %flang-new %s 2>&1 | FileCheck %s --check-prefix=ERROR -! RUN: not %flang-new -c %s 2>&1 | FileCheck %s --check-prefix=ERROR -! RUN: not %flang-new -emit-obj %s 2>&1 | FileCheck %s --check-prefix=ERROR -! RUN: not %flang-new -fc1 -emit-obj %s 2>&1 | FileCheck %s --check-prefix=ERROR - -! REQUIRES: new-flang-driver - ! Although code-generation is not yet available, we do have frontend actions ! that correspond to `-c` and `-emit-obj`. For now these actions are just a ! placeholder and running them leads to a driver error. This test makes sure @@ -12,4 +5,17 @@ ! rejected earlier). ! TODO: Replace this file with a proper test once code-generation is available. +! REQUIRES: new-flang-driver + +!----------- +! RUN LINES +!----------- +! RUN: not %flang %s 2>&1 | FileCheck %s --check-prefix=ERROR +! RUN: not %flang -c %s 2>&1 | FileCheck %s --check-prefix=ERROR +! RUN: not %flang -emit-obj %s 2>&1 | FileCheck %s --check-prefix=ERROR +! RUN: not %flang -fc1 -emit-obj %s 2>&1 | FileCheck %s --check-prefix=ERROR + +!----------------------- +! EXPECTED OUTPUT +!----------------------- ! ERROR: code-generation is not available yet diff --git a/flang/test/Driver/debug-measure-parse-tree.f90 b/flang/test/Driver/debug-measure-parse-tree.f90 index fd43468654cd4..5a7e0898a5f34 100644 --- a/flang/test/Driver/debug-measure-parse-tree.f90 +++ b/flang/test/Driver/debug-measure-parse-tree.f90 @@ -1,25 +1,13 @@ ! Ensure argument -fdebug-measure-parse-tree works as expected. -! REQUIRES: new-flang-driver - -!-------------------------- -! FLANG DRIVER (flang-new) -!-------------------------- -! RUN: not %flang-new -fdebug-measure-parse-tree %s 2>&1 | FileCheck %s --check-prefix=FLANG - -!---------------------------------------- -! FRONTEND FLANG DRIVER (flang-new -fc1) -!---------------------------------------- -! RUN: %flang-new -fc1 -fdebug-measure-parse-tree %s 2>&1 | FileCheck %s --check-prefix=FRONTEND - -!---------------------------------- -! EXPECTED OUTPUT WITH `flang-new` -!---------------------------------- -! FLANG:warning: argument unused during compilation: '-fdebug-measure-parse-tree' - -!--------------------------------------- -! EXPECTED OUTPUT WITH `flang-new -fc1` -!--------------------------------------- +!---------- +! RUN LINE +!---------- +! RUN: %flang_fc1 -fsyntax-only -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/driver-error-cc1.c b/flang/test/Driver/driver-error-cc1.c index aed0f74ecd0bf..2eb2fd02ee661 100644 --- a/flang/test/Driver/driver-error-cc1.c +++ b/flang/test/Driver/driver-error-cc1.c @@ -1,7 +1,14 @@ -// RUN: not %flang-new %s 2>&1 | FileCheck %s +// C files are currently not supported (i.e. `flang -cc1`). Make sure that the +// driver reports this as expected. // REQUIRES: new-flang-driver -// C files are currently not supported (i.e. `flang -cc1`) +//----------- +// RUN LINES +//----------- +// RUN: not %flang %s 2>&1 | FileCheck %s +//----------------------- +// EXPECTED OUTPUT +//----------------------- // CHECK: error: unknown integrated tool '-cc1'. Valid tools include '-fc1'. diff --git a/flang/test/Driver/driver-error-cc1.cpp b/flang/test/Driver/driver-error-cc1.cpp index 0de39dc90ea21..f752f8ae10f59 100644 --- a/flang/test/Driver/driver-error-cc1.cpp +++ b/flang/test/Driver/driver-error-cc1.cpp @@ -1,7 +1,14 @@ -// RUN: not %flang-new %s 2>&1 | FileCheck %s +// C++ files are currently not supported (i.e. `flang -cc1`). Make sure that the +// driver reports this as expected. // REQUIRES: new-flang-driver -// C++ files are currently not supported (i.e. `flang -cc1`) +//----------- +// RUN LINES +//----------- +// RUN: not %flang %s 2>&1 | FileCheck %s +//----------------------- +// EXPECTED OUTPUT +//----------------------- // CHECK: error: unknown integrated tool '-cc1'. Valid tools include '-fc1'. diff --git a/flang/test/Driver/driver-help-hidden.f90 b/flang/test/Driver/driver-help-hidden.f90 index 164b6d104ebc6..5bbdbb8ab7498 100644 --- a/flang/test/Driver/driver-help-hidden.f90 +++ b/flang/test/Driver/driver-help-hidden.f90 @@ -3,14 +3,14 @@ !-------------------------- ! FLANG DRIVER (flang-new) !-------------------------- -! RUN: %flang-new --help-hidden 2>&1 | FileCheck %s -! RUN: not %flang-new -help-hidden 2>&1 | FileCheck %s --check-prefix=ERROR-FLANG +! RUN: %flang --help-hidden 2>&1 | FileCheck %s +! RUN: not %flang -help-hidden 2>&1 | FileCheck %s --check-prefix=ERROR-FLANG !---------------------------------------- ! FLANG FRONTEND DRIVER (flang-new -fc1) !---------------------------------------- -! RUN: not %flang-new -fc1 --help-hidden 2>&1 | FileCheck %s --check-prefix=ERROR-FLANG-FC1 -! RUN: not %flang-new -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 +! RUN: not %flang_fc1 -help-hidden 2>&1 | FileCheck %s --check-prefix=ERROR-FLANG-FC1 !---------------------------------------------------- ! EXPECTED OUTPUT FOR FLANG DRIVER (flang-new) diff --git a/flang/test/Driver/driver-help.f90 b/flang/test/Driver/driver-help.f90 index dd43990bb1ac1..b1b698b99b9bb 100644 --- a/flang/test/Driver/driver-help.f90 +++ b/flang/test/Driver/driver-help.f90 @@ -1,21 +1,21 @@ ! REQUIRES: new-flang-driver !-------------------------- -! FLANG DRIVER (flang-new) +! FLANG DRIVER (flang) !-------------------------- -! RUN: %flang-new -help 2>&1 | FileCheck %s --check-prefix=HELP -! RUN: not %flang-new -helps 2>&1 | FileCheck %s --check-prefix=ERROR +! RUN: %flang -help 2>&1 | FileCheck %s --check-prefix=HELP +! RUN: not %flang -helps 2>&1 | FileCheck %s --check-prefix=ERROR !---------------------------------------- -! FLANG FRONTEND DRIVER (flang-new -fc1) +! FLANG FRONTEND DRIVER (flang -fc1) !---------------------------------------- -! RUN: %flang-new -fc1 -help 2>&1 | FileCheck %s --check-prefix=HELP-FC1 -! RUN: not %flang-new -fc1 -helps 2>&1 | FileCheck %s --check-prefix=ERROR +! 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-new) +! EXPECTED OUTPUT FOR FLANG DRIVER (flang) !---------------------------------------------------- -! HELP:USAGE: flang-new +! HELP:USAGE: flang ! HELP-EMPTY: ! HELP-NEXT:OPTIONS: ! HELP-NEXT: -### Print (but do not run) the commands to run for this compilation @@ -57,9 +57,9 @@ ! HELP-NEXT: -Xflang Pass to the flang compiler !------------------------------------------------------------- -! EXPECTED OUTPUT FOR FLANG FRONTEND DRIVER (flang-new -fc1) +! EXPECTED OUTPUT FOR FLANG FRONTEND DRIVER (flang -fc1) !------------------------------------------------------------- -! HELP-FC1:USAGE: flang-new +! HELP-FC1:USAGE: flang ! HELP-FC1-EMPTY: ! HELP-FC1-NEXT:OPTIONS: ! HELP-FC1-NEXT: -cpp Enable predefined and command line preprocessor macros diff --git a/flang/test/Driver/driver-version.f90 b/flang/test/Driver/driver-version.f90 index a504635ffeb75..bfa2149de33ab 100644 --- a/flang/test/Driver/driver-version.f90 +++ b/flang/test/Driver/driver-version.f90 @@ -1,8 +1,14 @@ -! RUN: %flang-new --version 2>&1 | FileCheck %s -! RUN: not %flang-new --versions 2>&1 | FileCheck %s --check-prefix=ERROR - ! REQUIRES: new-flang-driver +!----------- +! RUN LINES +!----------- +! RUN: %flang --version 2>&1 | FileCheck %s +! RUN: not %flang --versions 2>&1 | FileCheck %s --check-prefix=ERROR + +!----------------------- +! EXPECTED OUTPUT +!----------------------- ! CHECK: flang-new version ! CHECK-NEXT: Target: ! CHECK-NEXT: Thread model: diff --git a/flang/test/Driver/escaped-backslash.f90 b/flang/test/Driver/escaped-backslash.f90 index 0e87b581cebc6..20e48c6de004d 100644 --- a/flang/test/Driver/escaped-backslash.f90 +++ b/flang/test/Driver/escaped-backslash.f90 @@ -1,20 +1,18 @@ ! Ensure argument -fbackslash works as expected. -! REQUIRES: new-flang-driver - !-------------------------- ! FLANG DRIVER (flang-new) !-------------------------- -! RUN: %flang-new -E %s 2>&1 | FileCheck %s --check-prefix=ESCAPED -! RUN: %flang-new -E -fbackslash -fno-backslash %s 2>&1 | FileCheck %s --check-prefix=ESCAPED -! RUN: %flang-new -E -fbackslash %s 2>&1 | FileCheck %s --check-prefix=UNESCAPED +! RUN: %flang -E %s 2>&1 | FileCheck %s --check-prefix=ESCAPED +! RUN: %flang -E -fbackslash -fno-backslash %s 2>&1 | FileCheck %s --check-prefix=ESCAPED +! RUN: %flang -E -fbackslash %s 2>&1 | FileCheck %s --check-prefix=UNESCAPED !----------------------------------------- ! FRONTEND FLANG DRIVER (flang-new -fc1) !----------------------------------------- -! RUN: %flang-new -fc1 -E %s 2>&1 | FileCheck %s --check-prefix=ESCAPED -! RUN: %flang-new -fc1 -E -fbackslash -fno-backslash %s 2>&1 | FileCheck %s --check-prefix=ESCAPED -! RUN: %flang-new -fc1 -E -fbackslash %s 2>&1 | FileCheck %s --check-prefix=UNESCAPED +! RUN: %flang_fc1 -E %s 2>&1 | FileCheck %s --check-prefix=ESCAPED +! 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 diff --git a/flang/test/Driver/fixed-free-detection.f90 b/flang/test/Driver/fixed-free-detection.f90 index a24be5341db44..abbe17d2a663f 100644 --- a/flang/test/Driver/fixed-free-detection.f90 +++ b/flang/test/Driver/fixed-free-detection.f90 @@ -2,21 +2,19 @@ ! This test exploits the fact that the preprocessor treats white-spaces differently for free ! and fixed form input files. -! REQUIRES: new-flang-driver - !-------------------------- -! FLANG DRIVER (flang-new) +! FLANG DRIVER (flang) !-------------------------- -! RUN: %flang-new -E %S/Inputs/free-form-test.f90 2>&1 | FileCheck %s --check-prefix=FREEFORM -! RUN: %flang-new -E %S/Inputs/fixed-form-test.f 2>&1 | FileCheck %s --check-prefix=FIXEDFORM -! RUN: %flang-new -E %S/Inputs/free-form-test.f90 %S/Inputs/fixed-form-test.f 2>&1 | FileCheck %s --check-prefix=MULTIPLEFORMS +! RUN: %flang -E %S/Inputs/free-form-test.f90 2>&1 | FileCheck %s --check-prefix=FREEFORM +! RUN: %flang -E %S/Inputs/fixed-form-test.f 2>&1 | FileCheck %s --check-prefix=FIXEDFORM +! RUN: %flang -E %S/Inputs/free-form-test.f90 %S/Inputs/fixed-form-test.f 2>&1 | FileCheck %s --check-prefix=MULTIPLEFORMS !----------------------------------------- -! FRONTEND FLANG DRIVER (flang-new -fc1) +! FRONTEND FLANG DRIVER (flang_fc1) !----------------------------------------- -! RUN: %flang-new -fc1 -E %S/Inputs/free-form-test.f90 2>&1 | FileCheck %s --check-prefix=FREEFORM -! RUN: %flang-new -fc1 -E %S/Inputs/fixed-form-test.f 2>&1 | FileCheck %s --check-prefix=FIXEDFORM -! RUN: %flang-new -fc1 -E %S/Inputs/free-form-test.f90 %S/Inputs/fixed-form-test.f 2>&1 | FileCheck %s --check-prefix=MULTIPLEFORMS +! RUN: %flang_fc1 -E %S/Inputs/free-form-test.f90 2>&1 | FileCheck %s --check-prefix=FREEFORM +! RUN: %flang_fc1 -E %S/Inputs/fixed-form-test.f 2>&1 | FileCheck %s --check-prefix=FIXEDFORM +! RUN: %flang_fc1 -E %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 diff --git a/flang/test/Driver/fixed-free-flag.f90 b/flang/test/Driver/fixed-free-flag.f90 index 532175cce5d2c..265d8fcaf3b8a 100644 --- a/flang/test/Driver/fixed-free-flag.f90 +++ b/flang/test/Driver/fixed-free-flag.f90 @@ -1,23 +1,21 @@ ! Ensure arguments -ffree-form and -ffixed-form work as expected. -! REQUIRES: new-flang-driver - !-------------------------- -! FLANG DRIVER (flang-new) +! FLANG DRIVER (flang) !-------------------------- -! RUN: not %flang-new -fsyntax-only -ffree-form %S/Inputs/fixed-form-test.f 2>&1 | FileCheck %s --check-prefix=FREEFORM -! RUN: %flang-new -fsyntax-only -ffixed-form %S/Inputs/free-form-test.f90 2>&1 | FileCheck %s --check-prefix=FIXEDFORM +! RUN: not %flang -fsyntax-only -ffree-form %S/Inputs/fixed-form-test.f 2>&1 | FileCheck %s --check-prefix=FREEFORM +! RUN: %flang -fsyntax-only -ffixed-form %S/Inputs/free-form-test.f90 2>&1 | FileCheck %s --check-prefix=FIXEDFORM !---------------------------------------- -! FRONTEND FLANG DRIVER (flang-new -fc1) +! FRONTEND FLANG DRIVER (flang -fc1) !---------------------------------------- -! RUN: not %flang-new -fc1 -fsyntax-only -ffree-form %S/Inputs/fixed-form-test.f 2>&1 | FileCheck %s --check-prefix=FREEFORM -! RUN: %flang-new -fc1 -fsyntax-only -ffixed-form %S/Inputs/free-form-test.f90 2>&1 | FileCheck %s --check-prefix=FIXEDFORM +! 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:error: Could not parse +! FREEFORM: Could not parse !------------------------------------- ! EXPECTED OUTPUT FOR FIXED FORM MODE diff --git a/flang/test/Driver/fixed-line-length.f90 b/flang/test/Driver/fixed-line-length.f90 index 06cfa521524fb..9d41f5e942414 100644 --- a/flang/test/Driver/fixed-line-length.f90 +++ b/flang/test/Driver/fixed-line-length.f90 @@ -3,30 +3,30 @@ ! REQUIRES: new-flang-driver !-------------------------- -! FLANG DRIVER (flang-new) +! FLANG DRIVER (flang) !-------------------------- -! RUN: %flang-new -E %S/Inputs/fixed-line-length-test.f 2>&1 | FileCheck %s --check-prefix=DEFAULTLENGTH -! RUN: not %flang-new -E -ffixed-line-length=-2 %S/Inputs/fixed-line-length-test.f 2>&1 | FileCheck %s --check-prefix=NEGATIVELENGTH -! RUN: not %flang-new -E -ffixed-line-length=3 %S/Inputs/fixed-line-length-test.f 2>&1 | FileCheck %s --check-prefix=INVALIDLENGTH -! RUN: %flang-new -E -ffixed-line-length=none %S/Inputs/fixed-line-length-test.f 2>&1 | FileCheck %s --check-prefix=UNLIMITEDLENGTH -! RUN: %flang-new -E -ffixed-line-length=0 %S/Inputs/fixed-line-length-test.f 2>&1 | FileCheck %s --check-prefix=UNLIMITEDLENGTH -! RUN: %flang-new -E -ffixed-line-length=13 %S/Inputs/fixed-line-length-test.f 2>&1 | FileCheck %s --check-prefix=LENGTH13 +! RUN: %flang -E %S/Inputs/fixed-line-length-test.f 2>&1 | FileCheck %s --check-prefix=DEFAULTLENGTH +! RUN: not %flang -E -ffixed-line-length=-2 %S/Inputs/fixed-line-length-test.f 2>&1 | FileCheck %s --check-prefix=NEGATIVELENGTH +! RUN: not %flang -E -ffixed-line-length=3 %S/Inputs/fixed-line-length-test.f 2>&1 | FileCheck %s --check-prefix=INVALIDLENGTH +! RUN: %flang -E -ffixed-line-length=none %S/Inputs/fixed-line-length-test.f 2>&1 | FileCheck %s --check-prefix=UNLIMITEDLENGTH +! RUN: %flang -E -ffixed-line-length=0 %S/Inputs/fixed-line-length-test.f 2>&1 | FileCheck %s --check-prefix=UNLIMITEDLENGTH +! RUN: %flang -E -ffixed-line-length=13 %S/Inputs/fixed-line-length-test.f 2>&1 | FileCheck %s --check-prefix=LENGTH13 !---------------------------------------- -! FRONTEND FLANG DRIVER (flang-new -fc1) +! FRONTEND FLANG DRIVER (flang -fc1) !---------------------------------------- -! RUN: %flang-new -fc1 -E %S/Inputs/fixed-line-length-test.f 2>&1 | FileCheck %s --check-prefix=DEFAULTLENGTH -! RUN: not %flang-new -fc1 -E -ffixed-line-length=-2 %S/Inputs/fixed-line-length-test.f 2>&1 | FileCheck %s --check-prefix=NEGATIVELENGTH -! RUN: not %flang-new -fc1 -E -ffixed-line-length=3 %S/Inputs/fixed-line-length-test.f 2>&1 | FileCheck %s --check-prefix=INVALIDLENGTH -! RUN: %flang-new -fc1 -E -ffixed-line-length=none %S/Inputs/fixed-line-length-test.f 2>&1 | FileCheck %s --check-prefix=UNLIMITEDLENGTH -! RUN: %flang-new -fc1 -E -ffixed-line-length=0 %S/Inputs/fixed-line-length-test.f 2>&1 | FileCheck %s --check-prefix=UNLIMITEDLENGTH -! RUN: %flang-new -fc1 -E -ffixed-line-length=13 %S/Inputs/fixed-line-length-test.f 2>&1 | FileCheck %s --check-prefix=LENGTH13 +! RUN: %flang_fc1 -E %S/Inputs/fixed-line-length-test.f 2>&1 | FileCheck %s --check-prefix=DEFAULTLENGTH +! RUN: not %flang_fc1 -E -ffixed-line-length=-2 %S/Inputs/fixed-line-length-test.f 2>&1 | FileCheck %s --check-prefix=NEGATIVELENGTH +! RUN: not %flang_fc1 -E -ffixed-line-length=3 %S/Inputs/fixed-line-length-test.f 2>&1 | FileCheck %s --check-prefix=INVALIDLENGTH +! RUN: %flang_fc1 -E -ffixed-line-length=none %S/Inputs/fixed-line-length-test.f 2>&1 | FileCheck %s --check-prefix=UNLIMITEDLENGTH +! RUN: %flang_fc1 -E -ffixed-line-length=0 %S/Inputs/fixed-line-length-test.f 2>&1 | FileCheck %s --check-prefix=UNLIMITEDLENGTH +! RUN: %flang_fc1 -E -ffixed-line-length=13 %S/Inputs/fixed-line-length-test.f 2>&1 | FileCheck %s --check-prefix=LENGTH13 !------------------------------------- ! COMMAND ALIAS -ffixed-line-length-n !------------------------------------- -! RUN: %flang-new -E -ffixed-line-length-13 %S/Inputs/fixed-line-length-test.f 2>&1 | FileCheck %s --check-prefix=LENGTH13 -! RUN: %flang-new -fc1 -E -ffixed-line-length-13 %S/Inputs/fixed-line-length-test.f 2>&1 | FileCheck %s --check-prefix=LENGTH13 +! RUN: %flang -E -ffixed-line-length-13 %S/Inputs/fixed-line-length-test.f 2>&1 | FileCheck %s --check-prefix=LENGTH13 +! RUN: %flang_fc1 -E -ffixed-line-length-13 %S/Inputs/fixed-line-length-test.f 2>&1 | FileCheck %s --check-prefix=LENGTH13 !------------------------------------- ! EXPECTED OUTPUT WITH DEFAULT LENGTH diff --git a/flang/test/Driver/frontend-forwarding.f90 b/flang/test/Driver/frontend-forwarding.f90 index f447ad4f1fba9..7d24b97aae891 100644 --- a/flang/test/Driver/frontend-forwarding.f90 +++ b/flang/test/Driver/frontend-forwarding.f90 @@ -3,7 +3,7 @@ ! REQUIRES: new-flang-driver -! RUN: %flang-new -fsyntax-only -### %s -o %t 2>&1 \ +! RUN: %flang -fsyntax-only -### %s -o %t 2>&1 \ ! RUN: -finput-charset=utf-8 \ ! RUN: -fdefault-double-8 \ ! RUN: -fdefault-integer-8 \ diff --git a/flang/test/Driver/implicit-none.f90 b/flang/test/Driver/implicit-none.f90 index f08a5b22e8121..98d6c06f8d721 100644 --- a/flang/test/Driver/implicit-none.f90 +++ b/flang/test/Driver/implicit-none.f90 @@ -1,20 +1,18 @@ ! Ensure argument -fimplicit-none works as expected. -! REQUIRES: new-flang-driver - !-------------------------- -! FLANG DRIVER (flang-new) +! FLANG DRIVER (flang) !-------------------------- -! RUN: %flang-new -fsyntax-only %s 2>&1 | FileCheck %s --allow-empty --check-prefix=DEFAULT -! RUN: %flang-new -fsyntax-only -fimplicit-none -fno-implicit-none %s 2>&1 | FileCheck %s --allow-empty --check-prefix=DEFAULT -! RUN: not %flang-new -fsyntax-only -fimplicit-none %s 2>&1 | FileCheck %s --check-prefix=WITH_IMPL_NONE +! RUN: %flang -fsyntax-only %s 2>&1 | FileCheck %s --allow-empty --check-prefix=DEFAULT +! RUN: %flang -fsyntax-only -fimplicit-none -fno-implicit-none %s 2>&1 | FileCheck %s --allow-empty --check-prefix=DEFAULT +! RUN: not %flang -fsyntax-only -fimplicit-none %s 2>&1 | FileCheck %s --check-prefix=WITH_IMPL_NONE !----------------------------------------- -! FRONTEND FLANG DRIVER (flang-new -fc1) +! FRONTEND FLANG DRIVER (flang_fc1) !----------------------------------------- -! RUN: %flang-new -fc1 -fsyntax-only %s 2>&1 | FileCheck %s --allow-empty --check-prefix=DEFAULT -! RUN: %flang-new -fc1 -fsyntax-only -fimplicit-none -fno-implicit-none %s 2>&1 | FileCheck %s --allow-empty --check-prefix=DEFAULT -! RUN: not %flang-new -fc1 -fsyntax-only -fimplicit-none %s 2>&1 | FileCheck %s --check-prefix=WITH_IMPL_NONE +! RUN: %flang_fc1 -fsyntax-only %s 2>&1 | FileCheck %s --allow-empty --check-prefix=DEFAULT +! 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 diff --git a/flang/test/Driver/include-header.f90 b/flang/test/Driver/include-header.f90 index f3cafb78af0b5..6dbcfc1def620 100644 --- a/flang/test/Driver/include-header.f90 +++ b/flang/test/Driver/include-header.f90 @@ -1,22 +1,20 @@ ! Ensure argument -I works as expected with an included header. -! REQUIRES: new-flang-driver - !-------------------------- -! FLANG DRIVER (flang-new) +! FLANG DRIVER (flang) !-------------------------- -! RUN: not %flang-new -E %s 2>&1 | FileCheck %s --check-prefix=UNINCLUDED -! RUN: %flang-new -E -I %S/Inputs %s 2>&1 | FileCheck %s --check-prefix=SINGLEINCLUDE -! RUN: %flang-new -E -I %S/Inputs -I %S/Inputs/header-dir %s 2>&1 | FileCheck %s --check-prefix=MAINDIRECTORY -! RUN: %flang-new -E -I %S/Inputs/header-dir -I %S/Inputs %s 2>&1 | FileCheck %s --check-prefix=SUBDIRECTORY +! RUN: not %flang -E %s 2>&1 | FileCheck %s --check-prefix=UNINCLUDED +! RUN: %flang -E -I %S/Inputs %s 2>&1 | FileCheck %s --check-prefix=SINGLEINCLUDE +! RUN: %flang -E -I %S/Inputs -I %S/Inputs/header-dir %s 2>&1 | FileCheck %s --check-prefix=MAINDIRECTORY +! RUN: %flang -E -I %S/Inputs/header-dir -I %S/Inputs %s 2>&1 | FileCheck %s --check-prefix=SUBDIRECTORY !---------------------------------------- -! FRONTEND FLANG DRIVER (flang-new -fc1) +! FRONTEND FLANG DRIVER (flang_fc1) !---------------------------------------- -! RUN: not %flang-new -fc1 -E %s 2>&1 | FileCheck %s --check-prefix=UNINCLUDED -! RUN: %flang-new -fc1 -E -I %S/Inputs %s 2>&1 | FileCheck %s --check-prefix=SINGLEINCLUDE -! RUN: %flang-new -fc1 -E -I %S/Inputs -I %S/Inputs/header-dir %s 2>&1 | FileCheck %s --check-prefix=MAINDIRECTORY -! RUN: %flang-new -fc1 -E -I %S/Inputs/header-dir -I %S/Inputs %s 2>&1 | FileCheck %s --check-prefix=SUBDIRECTORY +! RUN: not %flang_fc1 -E %s 2>&1 | FileCheck %s --check-prefix=UNINCLUDED +! RUN: %flang_fc1 -E -I %S/Inputs %s 2>&1 | FileCheck %s --check-prefix=SINGLEINCLUDE +! 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 diff --git a/flang/test/Driver/macro-multiline.F90 b/flang/test/Driver/macro-multiline.F90 index c02996eed5bf5..8023459940be2 100644 --- a/flang/test/Driver/macro-multiline.F90 +++ b/flang/test/Driver/macro-multiline.F90 @@ -3,14 +3,14 @@ ! REQUIRES: new-flang-driver !-------------------------- -! FLANG DRIVER (flang-new) +! FLANG DRIVER (flang) !-------------------------- -! RUN: printf -- "-DX=A\\\\\nTHIS_SHOULD_NOT_EXIST_IN_THE_OUTPUT\n" | xargs %flang-new -E %s 2>&1 | FileCheck --strict-whitespace --match-full-lines %s +! RUN: printf -- "-DX=A\\\\\nTHIS_SHOULD_NOT_EXIST_IN_THE_OUTPUT\n" | xargs %flang -E %s 2>&1 | FileCheck --strict-whitespace --match-full-lines %s !----------------------------------------- -! FRONTEND FLANG DRIVER (flang-new -fc1) +! FRONTEND FLANG DRIVER (flang_fc1) !----------------------------------------- -! RUN: printf -- "-DX=A\\\\\nTHIS_SHOULD_NOT_EXIST_IN_THE_OUTPUT\n" | xargs %flang-new -fc1 -E %s 2>&1 | FileCheck --strict-whitespace --match-full-lines %s +! RUN: printf -- "-DX=A\\\\\nTHIS_SHOULD_NOT_EXIST_IN_THE_OUTPUT\n" | xargs %flang_fc1 -E %s 2>&1 | FileCheck --strict-whitespace --match-full-lines %s !------------------------------- ! EXPECTED OUTPUT FOR MACRO 'X' @@ -19,4 +19,4 @@ ! CHECK-NOT:THIS_SHOULD_NOT_EXIST_IN_THE_OUTPUT ! CHECK-NOT:this_should_not_exist_in_the_output -START X END \ No newline at end of file +START X END diff --git a/flang/test/Driver/missing-input.f90 b/flang/test/Driver/missing-input.f90 index 962b304582c89..ad56c65bff058 100644 --- a/flang/test/Driver/missing-input.f90 +++ b/flang/test/Driver/missing-input.f90 @@ -1,5 +1,3 @@ -! REQUIRES: new-flang-driver - ! Test the behaviour of the driver when input is missing or is invalid. Note ! that with the compiler driver (flang-new), the input _has_ to be specified. ! Indeed, the driver decides what "job/command" to create based on the input @@ -7,17 +5,19 @@ ! (compile? preprocess? link?). The frontend driver (flang-new -fc1) simply ! assumes that "no explicit input == read from stdin" +! REQUIRES: new-flang-driver + !-------------------------- ! FLANG DRIVER (flang-new) !-------------------------- -! RUN: not %flang-new 2>&1 | FileCheck %s --check-prefix=FLANG-NO-FILE -! RUN: not %flang-new %t 2>&1 | FileCheck %s --check-prefix=FLANG-NONEXISTENT-FILE +! RUN: not %flang 2>&1 | FileCheck %s --check-prefix=FLANG-NO-FILE +! RUN: not %flang %t 2>&1 | FileCheck %s --check-prefix=FLANG-NONEXISTENT-FILE !----------------------------------------- ! FLANG FRONTEND DRIVER (flang-new -fc1) !----------------------------------------- -! RUN: not %flang-new -fc1 %t 2>&1 | FileCheck %s --check-prefix=FLANG-FC1-NONEXISTENT-FILE -! RUN: not %flang-new -fc1 %S 2>&1 | FileCheck %s --check-prefix=FLANG-FC1-DIR +! RUN: not %flang_fc1 %t 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 diff --git a/flang/test/Driver/parse-error.f95 b/flang/test/Driver/parse-error.f95 index 8266d042df02c..00126047e6dfb 100644 --- a/flang/test/Driver/parse-error.f95 +++ b/flang/test/Driver/parse-error.f95 @@ -1,7 +1,6 @@ -! RUN: not %flang-new -fc1 -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix=ERROR -! RUN: not %f18 -syntax-only %s 2>&1 | FileCheck %s --check-prefix=ERROR +! Verify that parsing errors are correctly reported by the driver -! REQUIRES: new-flang-driver +! RUN: not %flang_fc1 -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix=ERROR ! ERROR: Could not parse {{.*}}parse-error.f95 diff --git a/flang/test/Driver/phases.f90 b/flang/test/Driver/phases.f90 index 62c54c73177e9..0f6e2450f330a 100644 --- a/flang/test/Driver/phases.f90 +++ b/flang/test/Driver/phases.f90 @@ -1,11 +1,17 @@ -! RUN: %flang-new -E -ccc-print-phases %s 2>&1 | FileCheck %s --check-prefix=PP -! RUN: %flang-new -fsyntax-only -ccc-print-phases %s 2>&1 | FileCheck %s --check-prefix=COMPILE -! RUN: %flang-new -c -ccc-print-phases %s 2>&1 | FileCheck %s --check-prefix=EMIT_OBJ +! This test verifies the phase control in Flang compiler driver. ! REQUIRES: new-flang-driver -! 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/scanning-error.f95 b/flang/test/Driver/scanning-error.f95 index dbbd222def084..a153ad51dbc17 100644 --- a/flang/test/Driver/scanning-error.f95 +++ b/flang/test/Driver/scanning-error.f95 @@ -1,7 +1,4 @@ -! RUN: not %flang-new -fc1 -E %s 2>&1 | FileCheck %s --check-prefix=ERROR -! RUN: not %f18 -E %s 2>&1 | FileCheck %s --check-prefix=ERROR - -! REQUIRES: new-flang-driver +! RUN: not %flang_fc1 -E %s 2>&1 | FileCheck %s --check-prefix=ERROR ! ERROR: Could not scan {{.*}}scanning-error.f95 diff --git a/flang/test/Driver/syntax-only.f90 b/flang/test/Driver/syntax-only.f90 index 0eed3cca2fe90..be61b63d2a586 100644 --- a/flang/test/Driver/syntax-only.f90 +++ b/flang/test/Driver/syntax-only.f90 @@ -1,9 +1,26 @@ -! RUN: not %flang-new -fc1 -fsyntax-only %s 2>&1 | FileCheck %s -! RUN: not %f18 -fsyntax-only %s 2>&1 | FileCheck %s +! Verify that the compiler driver correctly processes `-fsyntax-only`. By +! default it will try to run code-generation, but that's not supported yet. We +! don't need to test the frontend driver here - it runs `-fsyntax-only` by +! default. ! REQUIRES: new-flang-driver -! CHECK: IF statement is not allowed in IF statement -! CHECK: Semantic errors in {{.*}}syntax-only.f90 +!----------- +! RUN LINES +!----------- +! RUN: not %flang -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix=FSYNTAX_ONLY +! RUN: not %flang %s 2>&1 | FileCheck %s --check-prefix=NO_FSYNTAX_ONLY + +!----------------- +! EXPECTED OUTPUT +!----------------- +! FSYNTAX_ONLY: IF statement is not allowed in IF statement +! FSYNTAX_ONLY_NEXT: Semantic errors in {{.*}}syntax-only.f90 + +! NO_FSYNTAX_ONLY: error: code-generation is not available yet + +!------- +! INPUT +!------- IF (A > 0.0) IF (B < 0.0) A = LOG (A) END diff --git a/flang/test/Frontend/Inputs/hello-world.c b/flang/test/Frontend/Inputs/hello-world.c deleted file mode 100644 index 76e8197013aab..0000000000000 --- a/flang/test/Frontend/Inputs/hello-world.c +++ /dev/null @@ -1 +0,0 @@ -int main() { return 0; } diff --git a/flang/test/Frontend/input-output-file.f90 b/flang/test/Frontend/input-output-file.f90 index 47983660f5add..e93289f88d175 100644 --- a/flang/test/Frontend/input-output-file.f90 +++ b/flang/test/Frontend/input-output-file.f90 @@ -1,31 +1,31 @@ ! REQUIRES: new-flang-driver !-------------------------- -! FLANG DRIVER (flang-new) +! FLANG DRIVER (flang) !-------------------------- ! NOTE: Use `-E` so that the compiler driver stops after the 1st compilation phase, preprocessing. That's all we need. ! TEST 1: Print to stdout (implicit) -! RUN: %flang-new -E -Xflang -test-io %s 2>&1 | FileCheck %s --match-full-lines +! RUN: %flang -E -Xflang -test-io %s 2>&1 | FileCheck %s --match-full-lines ! TEST 2: Print to stdout (explicit) -! RUN: %flang-new -E -Xflang -test-io -o - %s 2>&1 | FileCheck %s --match-full-lines +! RUN: %flang -E -Xflang -test-io -o - %s 2>&1 | FileCheck %s --match-full-lines ! TEST 3: Print to a file -! RUN: %flang-new -E -Xflang -test-io -o %t %s 2>&1 && FileCheck %s --match-full-lines --input-file=%t +! RUN: %flang -E -Xflang -test-io -o %t %s 2>&1 && FileCheck %s --match-full-lines --input-file=%t !---------------------------------------- -! FLANG FRONTEND DRIVER (flang-new -fc1) +! FLANG FRONTEND DRIVER (flang -fc1) !---------------------------------------- ! TEST 4: Write to a file (implicit) ! This particular test case generates an output file in the same directory as the input file. We need to copy the input file into a ! temporary directory to avoid polluting the source directory. ! RUN: rm -rf %t-dir && mkdir -p %t-dir && cd %t-dir ! RUN: cp %s . -! RUN: %flang-new -fc1 -test-io input-output-file.f90 2>&1 && FileCheck %s --match-full-lines --input-file=input-output-file.txt +! RUN: %flang_fc1 -test-io input-output-file.f90 2>&1 && FileCheck %s --match-full-lines --input-file=input-output-file.txt ! TEST 5: Write to a file (explicit) -! RUN: %flang-new -fc1 -test-io -o %t %s 2>&1 && FileCheck %s --match-full-lines --input-file=%t +! RUN: %flang_fc1 -test-io -o %t %s 2>&1 && FileCheck %s --match-full-lines --input-file=%t !----------------------- ! EXPECTED OUTPUT diff --git a/flang/test/Frontend/multiple-input-files.f90 b/flang/test/Frontend/multiple-input-files.f90 index f06461a6060b6..406b6c0539bef 100644 --- a/flang/test/Frontend/multiple-input-files.f90 +++ b/flang/test/Frontend/multiple-input-files.f90 @@ -1,37 +1,37 @@ ! REQUIRES: new-flang-driver !-------------------------- -! FLANG DRIVER (flang-new) +! FLANG DRIVER (flang) !-------------------------- ! NOTE: Use `-E` so that the compiler driver stops after the 1st compilation phase, preprocessing. That's all we need. ! TEST 1: Both input files are processed (output is printed to stdout) -! RUN: %flang-new -E -Xflang -test-io %s %S/Inputs/hello-world.f90 | FileCheck %s --match-full-lines -check-prefix=FLANG +! RUN: %flang -E -Xflang -test-io %s %S/Inputs/hello-world.f90 | FileCheck %s --match-full-lines -check-prefix=FLANG ! TEST 2: None of the files is processed (not possible to specify the output file when multiple input files are present) -! RUN: not %flang-new -E -Xflang -test-io -o - %S/Inputs/hello-world.f90 %s 2>&1 | FileCheck %s --match-full-lines -check-prefix=ERROR -! RUN: not %flang-new -E -Xflang -test-io -o %t %S/Inputs/hello-world.f90 %s 2>&1 | FileCheck %s --match-full-lines -check-prefix=ERROR +! RUN: not %flang -E -Xflang -test-io -o - %S/Inputs/hello-world.f90 %s 2>&1 | FileCheck %s --match-full-lines -check-prefix=ERROR +! RUN: not %flang -E -Xflang -test-io -o %t %S/Inputs/hello-world.f90 %s 2>&1 | FileCheck %s --match-full-lines -check-prefix=ERROR !---------------------------------------- -! FLANG FRONTEND DRIVER (flang-new -fc1) +! FLANG FRONTEND DRIVER (flang -fc1) !---------------------------------------- ! TEST 3: Both input files are processed ! This particular test case generates output files in the same directory as the input files. We need to copy the input files into a ! temporary directory to avoid polluting the source directory. ! RUN: rm -rf %t-dir && mkdir -p %t-dir && cd %t-dir ! RUN: cp %s . && cp %S/Inputs/hello-world.f90 . -! RUN: %flang-new -fc1 -test-io hello-world.f90 multiple-input-files.f90 2>&1 \ +! RUN: %flang_fc1 -test-io hello-world.f90 multiple-input-files.f90 2>&1 \ ! RUN: && FileCheck %s --input-file=multiple-input-files.txt --match-full-lines -check-prefix=FC1-OUTPUT1 \ ! RUN: && FileCheck %s --input-file=hello-world.txt --match-full-lines -check-prefix=FC1-OUTPUT2 ! TEST 4: Only the last input file is processed -! RUN: %flang-new -fc1 -test-io %s %S/Inputs/hello-world.f90 -o %t 2>&1 \ +! RUN: %flang_fc1 -test-io %s %S/Inputs/hello-world.f90 -o %t 2>&1 \ ! RUN: && FileCheck %s --input-file=%t --match-full-lines -check-prefix=FC1-OUTPUT3 !----------------------- ! EXPECTED OUTPUT !----------------------- -! TEST 1: By default, `flang-new` prints the output from all input files to +! TEST 1: By default, `flang` prints the output from all input files to ! stdout ! FLANG-LABEL: Program arithmetic ! FLANG-NEXT: Integer :: i, j @@ -43,10 +43,10 @@ ! FLANG-NEXT: write(*,*) 'Hello world!' ! FLANG-NEXT:end program hello -! TEST 2: `-o` does not work for `flang-new` when multiple input files are present +! TEST 2: `-o` does not work for `flang` when multiple input files are present ! ERROR: flang-new: error: cannot specify -o when generating multiple output files -! TEST 3: The output file _was not_ specified - `flang-new -fc1` will process all +! TEST 3: The output file _was not_ specified - `flang_fc1` will process all ! input files and generate one output file for every input file. ! FC1-OUTPUT1-LABEL: Program arithmetic ! FC1-OUTPUT1-NEXT: Integer :: i, j @@ -59,7 +59,7 @@ ! FC1-OUTPUT2-NEXT: write(*,*) 'Hello world!' ! FC1-OUTPUT2-NEXT:end program hello -! TEST 4: The output file _was_ specified - `flang-new -fc1` will process only +! TEST 4: The output file _was_ specified - `flang_fc1` will process only ! the last input file and generate the corresponding output. ! FC1-OUTPUT3-LABEL:!This is a test file with a hello world in Fortran ! FC1-OUTPUT3-NEXT:program hello diff --git a/flang/test/Frontend/prescanner-diag.f90 b/flang/test/Frontend/prescanner-diag.f90 index 80ccbd552164b..f432872d162b2 100644 --- a/flang/test/Frontend/prescanner-diag.f90 +++ b/flang/test/Frontend/prescanner-diag.f90 @@ -1,5 +1,12 @@ -! Test that the driver correctly reports diagnostics from the prescanner. The contents of the include file are irrelevant here. +! Test that the driver correctly reports diagnostics from the prescanner, no +! matter what driver action/phase is run. We need this test as Flang currently +! has no central API for managing the diagnostics. For this reason the driver +! needs to make sure that the diagnostics are indeed issued (rather that relying +! on some DiagnosticsEngine). +!----------- +! RUN LINES +!----------- ! Test with -E (i.e. PrintPreprocessedAction, stops after prescanning) ! RUN: %flang -E -I %S/Inputs/ %s 2>&1 | FileCheck %s ! RUN: %flang_fc1 -E -I %S/Inputs/ %s 2>&1 | FileCheck %s @@ -8,8 +15,15 @@ ! RUN: %flang -fsyntax-only -I %S/Inputs/ %s 2>&1 | FileCheck %s ! RUN: %flang_fc1 -fsyntax-only -I %S/Inputs/ %s 2>&1 | FileCheck %s -! CHECK: prescanner-diag.f90:12:20: #include: extra stuff ignored after file name +!----------------------- +! EXPECTED OUTPUT +!----------------------- +! CHECK: prescanner-diag.f90:27:20: #include: extra stuff ignored after file name +! CHECK: prescanner-diag.f90:28:20: #include: extra stuff ignored after file name + +!------- +! INPUT +!------- #include comment -! CHECK: prescanner-diag.f90:14:20: #include: extra stuff ignored after file name #include "empty.h" comment end diff --git a/flang/test/Frontend/print-preprocess-C-file.f90 b/flang/test/Frontend/print-preprocess-C-file.f90 deleted file mode 100644 index fab82c2709549..0000000000000 --- a/flang/test/Frontend/print-preprocess-C-file.f90 +++ /dev/null @@ -1,13 +0,0 @@ -! Test preprocessing for C files using Flang driver - -! REQUIRES: new-flang-driver - -!-------------------------- -! FLANG DRIVER (flang-new) -!-------------------------- -! RUN: not %flang-new -E %S/Inputs/hello-world.c 2>&1 | FileCheck %s - -!----------------------- -! EXPECTED OUTPUT -!----------------------- -! CHECK: error: unknown integrated tool '-cc1'. Valid tools include '-fc1'. diff --git a/flang/test/Frontend/print-preprocessed-file.f90 b/flang/test/Frontend/print-preprocessed-file.f90 deleted file mode 100644 index 873bb2b3e3700..0000000000000 --- a/flang/test/Frontend/print-preprocessed-file.f90 +++ /dev/null @@ -1,33 +0,0 @@ -! Test printpreprocessed action - -! REQUIRES: new-flang-driver - -!-------------------------- -! FLANG DRIVER (flang-new) -!-------------------------- -! RUN: %flang-new -E %s 2>&1 | FileCheck %s - -!----------------------------------------- -! FRONTEND FLANG DRIVER (flang-new -fc1) -!----------------------------------------- -! RUN: %flang-new -fc1 -E %s 2>&1 | FileCheck %s - -!----------------------- -! EXPECTED OUTPUT -!----------------------- -! CHECK:program a -! CHECK-NOT:program b -! CHECK-NEXT:x = 1 -! CHECK-NEXT:write(*,*) x -! CHECK-NEXT:end - -! Preprocessed-file.F: -#define NEW -#ifdef NEW - program A -#else - program B -#endif - x = 1 - write(*,*) x - end diff --git a/flang/test/lit.cfg.py b/flang/test/lit.cfg.py index 7c99d6f7636d5..c2c2e7b523ae6 100644 --- a/flang/test/lit.cfg.py +++ b/flang/test/lit.cfg.py @@ -68,7 +68,6 @@ ] if config.include_flang_new_driver_test: - tools.append(ToolSubst('%flang-new', command=FindTool('flang-new'), unresolved='fatal')) tools.append(ToolSubst('%flang', command=FindTool('flang-new'), unresolved='fatal')) tools.append(ToolSubst('%flang_fc1', command=FindTool('flang-new'), extra_args=['-fc1'], unresolved='fatal')) diff --git a/flang/tools/f18/f18.cpp b/flang/tools/f18/f18.cpp index 9a24183aa8738..1a658781d263b 100644 --- a/flang/tools/f18/f18.cpp +++ b/flang/tools/f18/f18.cpp @@ -535,9 +535,13 @@ int main(int argc, char *const argv[]) { options.features.Enable( Fortran::parser::LanguageFeature::LogicalAbbreviations, arg == "-flogical-abbreviations"); - } else if (arg == "-fimplicit-none-type-always") { + } else if (arg == "-fimplicit-none-type-always" || + arg == "-fimplicit-none") { options.features.Enable( Fortran::common::LanguageFeature::ImplicitNoneTypeAlways); + } else if (arg == "-fno-implicit-none") { + options.features.Enable( + Fortran::common::LanguageFeature::ImplicitNoneTypeAlways, false); } else if (arg == "-fimplicit-none-type-never") { options.features.Enable( Fortran::common::LanguageFeature::ImplicitNoneTypeNever);