diff --git a/flang/test/Flang-Driver/Inputs/basic-header-one.h b/flang/test/Driver/Inputs/basic-header-one.h rename from flang/test/Flang-Driver/Inputs/basic-header-one.h rename to flang/test/Driver/Inputs/basic-header-one.h diff --git a/flang/test/Flang-Driver/Inputs/basic-header-two.h b/flang/test/Driver/Inputs/basic-header-two.h rename from flang/test/Flang-Driver/Inputs/basic-header-two.h rename to flang/test/Driver/Inputs/basic-header-two.h diff --git a/flang/test/Flang-Driver/Inputs/basictestmoduleone.mod b/flang/test/Driver/Inputs/basictestmoduleone.mod rename from flang/test/Flang-Driver/Inputs/basictestmoduleone.mod rename to flang/test/Driver/Inputs/basictestmoduleone.mod diff --git a/flang/test/Flang-Driver/Inputs/fixed-form-test.f b/flang/test/Driver/Inputs/fixed-form-test.f rename from flang/test/Flang-Driver/Inputs/fixed-form-test.f rename to flang/test/Driver/Inputs/fixed-form-test.f diff --git a/flang/test/Flang-Driver/Inputs/fixed-line-length-test.f b/flang/test/Driver/Inputs/fixed-line-length-test.f rename from flang/test/Flang-Driver/Inputs/fixed-line-length-test.f rename to flang/test/Driver/Inputs/fixed-line-length-test.f diff --git a/flang/test/Flang-Driver/Inputs/free-form-test.f90 b/flang/test/Driver/Inputs/free-form-test.f90 rename from flang/test/Flang-Driver/Inputs/free-form-test.f90 rename to flang/test/Driver/Inputs/free-form-test.f90 diff --git a/flang/test/Flang-Driver/Inputs/header-dir/basic-header-one.h b/flang/test/Driver/Inputs/header-dir/basic-header-one.h rename from flang/test/Flang-Driver/Inputs/header-dir/basic-header-one.h rename to flang/test/Driver/Inputs/header-dir/basic-header-one.h diff --git a/flang/test/Flang-Driver/Inputs/header-dir/basic-header-two.h b/flang/test/Driver/Inputs/header-dir/basic-header-two.h rename from flang/test/Flang-Driver/Inputs/header-dir/basic-header-two.h rename to flang/test/Driver/Inputs/header-dir/basic-header-two.h diff --git a/flang/test/Flang-Driver/Inputs/module-dir/basictestmoduleone.mod b/flang/test/Driver/Inputs/module-dir/basictestmoduleone.mod rename from flang/test/Flang-Driver/Inputs/module-dir/basictestmoduleone.mod rename to flang/test/Driver/Inputs/module-dir/basictestmoduleone.mod diff --git a/flang/test/Flang-Driver/Inputs/module-dir/basictestmoduletwo.mod b/flang/test/Driver/Inputs/module-dir/basictestmoduletwo.mod rename from flang/test/Flang-Driver/Inputs/module-dir/basictestmoduletwo.mod rename to flang/test/Driver/Inputs/module-dir/basictestmoduletwo.mod diff --git a/flang/test/Flang-Driver/code-gen.f90 b/flang/test/Driver/code-gen.f90 rename from flang/test/Flang-Driver/code-gen.f90 rename to flang/test/Driver/code-gen.f90 diff --git a/flang/test/Flang-Driver/debug-measure-parse-tree.f90 b/flang/test/Driver/debug-measure-parse-tree.f90 rename from flang/test/Flang-Driver/debug-measure-parse-tree.f90 rename to flang/test/Driver/debug-measure-parse-tree.f90 diff --git a/flang/test/Flang-Driver/debug-provenance.f90 b/flang/test/Driver/debug-provenance.f90 rename from flang/test/Flang-Driver/debug-provenance.f90 rename to flang/test/Driver/debug-provenance.f90 diff --git a/flang/test/Flang-Driver/driver-error-cc1.c b/flang/test/Driver/driver-error-cc1.c rename from flang/test/Flang-Driver/driver-error-cc1.c rename to flang/test/Driver/driver-error-cc1.c diff --git a/flang/test/Flang-Driver/driver-error-cc1.cpp b/flang/test/Driver/driver-error-cc1.cpp rename from flang/test/Flang-Driver/driver-error-cc1.cpp rename to flang/test/Driver/driver-error-cc1.cpp diff --git a/flang/test/Flang-Driver/driver-help-hidden.f90 b/flang/test/Driver/driver-help-hidden.f90 rename from flang/test/Flang-Driver/driver-help-hidden.f90 rename to flang/test/Driver/driver-help-hidden.f90 diff --git a/flang/test/Flang-Driver/driver-help.f90 b/flang/test/Driver/driver-help.f90 rename from flang/test/Flang-Driver/driver-help.f90 rename to flang/test/Driver/driver-help.f90 diff --git a/flang/test/Flang-Driver/driver-version.f90 b/flang/test/Driver/driver-version.f90 rename from flang/test/Flang-Driver/driver-version.f90 rename to flang/test/Driver/driver-version.f90 --- a/flang/test/Flang-Driver/driver-version.f90 +++ b/flang/test/Driver/driver-version.f90 @@ -3,9 +3,9 @@ ! REQUIRES: new-flang-driver -! CHECK:flang-new version -! CHECK-NEXT:Target: -! CHECK-NEXT:Thread model: -! CHECK-NEXT:InstalledDir: +! CHECK: flang-new version +! CHECK-NEXT: Target: +! CHECK-NEXT: Thread model: +! CHECK-NEXT: InstalledDir: ! ERROR: flang-new: error: unsupported option '--versions'; did you mean '--version'? diff --git a/flang/test/Flang-Driver/escaped-backslash.f90 b/flang/test/Driver/escaped-backslash.f90 rename from flang/test/Flang-Driver/escaped-backslash.f90 rename to flang/test/Driver/escaped-backslash.f90 diff --git a/flang/test/Flang-Driver/fdefault.f90 b/flang/test/Driver/fdefault.f90 rename from flang/test/Flang-Driver/fdefault.f90 rename to flang/test/Driver/fdefault.f90 diff --git a/flang/test/Flang-Driver/fixed-free-detection.f90 b/flang/test/Driver/fixed-free-detection.f90 rename from flang/test/Flang-Driver/fixed-free-detection.f90 rename to flang/test/Driver/fixed-free-detection.f90 diff --git a/flang/test/Flang-Driver/fixed-free-flag.f90 b/flang/test/Driver/fixed-free-flag.f90 rename from flang/test/Flang-Driver/fixed-free-flag.f90 rename to flang/test/Driver/fixed-free-flag.f90 diff --git a/flang/test/Flang-Driver/fixed-line-length.f90 b/flang/test/Driver/fixed-line-length.f90 rename from flang/test/Flang-Driver/fixed-line-length.f90 rename to flang/test/Driver/fixed-line-length.f90 diff --git a/flang/test/Flang-Driver/flarge_sizes.f90 b/flang/test/Driver/flarge_sizes.f90 rename from flang/test/Flang-Driver/flarge_sizes.f90 rename to flang/test/Driver/flarge_sizes.f90 diff --git a/flang/test/Flang-Driver/frontend-forwarding.f90 b/flang/test/Driver/frontend-forwarding.f90 rename from flang/test/Flang-Driver/frontend-forwarding.f90 rename to flang/test/Driver/frontend-forwarding.f90 diff --git a/flang/test/Driver/help.f90 b/flang/test/Driver/help-f18.f90 rename from flang/test/Driver/help.f90 rename to flang/test/Driver/help-f18.f90 diff --git a/flang/test/Flang-Driver/implicit-none.f90 b/flang/test/Driver/implicit-none.f90 rename from flang/test/Flang-Driver/implicit-none.f90 rename to flang/test/Driver/implicit-none.f90 diff --git a/flang/test/Flang-Driver/include-header.f90 b/flang/test/Driver/include-header.f90 rename from flang/test/Flang-Driver/include-header.f90 rename to flang/test/Driver/include-header.f90 diff --git a/flang/test/Flang-Driver/input-from-stdin.f90 b/flang/test/Driver/input-from-stdin.f90 rename from flang/test/Flang-Driver/input-from-stdin.f90 rename to flang/test/Driver/input-from-stdin.f90 --- a/flang/test/Flang-Driver/input-from-stdin.f90 +++ b/flang/test/Driver/input-from-stdin.f90 @@ -3,27 +3,27 @@ ! REQUIRES: new-flang-driver !-------------------------- -! FLANG DRIVER (flang-new) +! FLANG DRIVER (flang) !-------------------------- ! Input type is implicit -! RUN: cat %s | flang-new -E - | FileCheck %s --check-prefix=PP-NOT-DEFINED -! RUN: cat %s | flang-new -DNEW -E - | FileCheck %s --check-prefix=PP-DEFINED +! RUN: cat %s | %flang -E - | FileCheck %s --check-prefix=PP-NOT-DEFINED +! RUN: cat %s | %flang -DNEW -E - | FileCheck %s --check-prefix=PP-DEFINED ! Input type is explicit -! RUN: cat %s | flang-new -E -x f95-cpp-input - | FileCheck %s --check-prefix=PP-NOT-DEFINED -! RUN: cat %s | flang-new -DNEW -E -x f95-cpp-input - | FileCheck %s --check-prefix=PP-DEFINED +! RUN: cat %s | %flang -E -x f95-cpp-input - | FileCheck %s --check-prefix=PP-NOT-DEFINED +! RUN: cat %s | %flang -DNEW -E -x f95-cpp-input - | FileCheck %s --check-prefix=PP-DEFINED !--------------------------------------- -! FLANG FRONTEND DRIVER (flang-new -fc1) +! FLANG FRONTEND DRIVER (flang -fc1) !--------------------------------------- ! Test `-E`: for the corresponding frontend actions the driver relies on the prescanner API to handle file I/O -! RUN: cat %s | flang-new -fc1 -E | FileCheck %s --check-prefix=PP-NOT-DEFINED -! RUN: cat %s | flang-new -fc1 -DNEW -E | FileCheck %s --check-prefix=PP-DEFINED +! RUN: cat %s | %flang -fc1 -E | FileCheck %s --check-prefix=PP-NOT-DEFINED +! RUN: cat %s | %flang -fc1 -DNEW -E | FileCheck %s --check-prefix=PP-DEFINED ! Test `-test-io`: for the corresponding frontend action (`InputOutputTestAction`) the driver handles the file I/O on its own ! the corresponding action (`PrintPreprocessedAction`) -! RUN: cat %s | flang-new -fc1 -test-io | FileCheck %s --check-prefix=IO --match-full-lines -! RUN: cat %s | flang-new -fc1 -DNEW -test-io | FileCheck %s --check-prefix=IO --match-full-lines +! RUN: cat %s | %flang -fc1 -test-io | FileCheck %s --check-prefix=IO --match-full-lines +! RUN: cat %s | %flang -fc1 -DNEW -test-io | FileCheck %s --check-prefix=IO --match-full-lines !------------------------- ! EXPECTED OUTPUT for `-E` diff --git a/flang/test/Flang-Driver/macro-def-undef.f90 b/flang/test/Driver/macro-def-undef.f90 rename from flang/test/Flang-Driver/macro-def-undef.f90 rename to flang/test/Driver/macro-def-undef.f90 diff --git a/flang/test/Flang-Driver/macro-multiline.f90 b/flang/test/Driver/macro-multiline.f90 rename from flang/test/Flang-Driver/macro-multiline.f90 rename to flang/test/Driver/macro-multiline.f90 diff --git a/flang/test/Flang-Driver/missing-input.f90 b/flang/test/Driver/missing-input.f90 rename from flang/test/Flang-Driver/missing-input.f90 rename to flang/test/Driver/missing-input.f90 diff --git a/flang/test/Driver/no-files.f90 b/flang/test/Driver/no-files.f90 deleted file mode 100644 --- a/flang/test/Driver/no-files.f90 +++ /dev/null @@ -1,10 +0,0 @@ -! RUN: %f18 < %S/Inputs/hello.f90 | FileCheck %s - - -! CHECK: Enter Fortran source -! CHECK: Use EOF character (^D) to end file - -! CHECK: Parse tree comprises {{.*}} objects and occupies {{.*}} total bytes -! CHECK: PROGRAM hello -! CHECK: WRITE (*, *) "hello world" -! CHECK: END PROGRAM hello diff --git a/flang/test/Flang-Driver/parse-error.f95 b/flang/test/Driver/parse-error.f95 rename from flang/test/Flang-Driver/parse-error.f95 rename to flang/test/Driver/parse-error.f95 diff --git a/flang/test/Flang-Driver/phases.f90 b/flang/test/Driver/phases.f90 rename from flang/test/Flang-Driver/phases.f90 rename to flang/test/Driver/phases.f90 diff --git a/flang/test/Flang-Driver/predefined-macros-compiler-version.f90 b/flang/test/Driver/predefined-macros-compiler-version.f90 rename from flang/test/Flang-Driver/predefined-macros-compiler-version.f90 rename to flang/test/Driver/predefined-macros-compiler-version.f90 diff --git a/flang/test/Flang-Driver/scanning-error.f95 b/flang/test/Driver/scanning-error.f95 rename from flang/test/Flang-Driver/scanning-error.f95 rename to flang/test/Driver/scanning-error.f95 diff --git a/flang/test/Flang-Driver/syntax-only.f90 b/flang/test/Driver/syntax-only.f90 rename from flang/test/Flang-Driver/syntax-only.f90 rename to flang/test/Driver/syntax-only.f90 diff --git a/flang/test/Flang-Driver/use-module-error.f90 b/flang/test/Driver/use-module-error.f90 rename from flang/test/Flang-Driver/use-module-error.f90 rename to flang/test/Driver/use-module-error.f90 diff --git a/flang/test/Flang-Driver/use-module.f90 b/flang/test/Driver/use-module.f90 rename from flang/test/Flang-Driver/use-module.f90 rename to flang/test/Driver/use-module.f90 diff --git a/flang/test/Driver/version-test.f90 b/flang/test/Driver/version-test.f90 deleted file mode 100644 --- a/flang/test/Driver/version-test.f90 +++ /dev/null @@ -1,10 +0,0 @@ -! Check that lit configuration works by checking the compiler version - -! VERSION-NOT:{{![[:space:]]}} -! VERSION:{{[[:space:]]}} -! VERSION-SAME:f18 compiler (under development), version {{[1-9][0-9]*.[0-9]*.[0-9]*}} -! VERSION-EMPTY: - -! RUN: %f18 -V 2>&1 | FileCheck -check-prefix=VERSION %s -! RUN: %f18 -v 2>&1 | FileCheck -check-prefix=VERSION %s -! RUN: %f18 --version 2>&1 | FileCheck -check-prefix=VERSION %s diff --git a/flang/test/Driver/write-module.f90 b/flang/test/Driver/write-module.f90 --- a/flang/test/Driver/write-module.f90 +++ b/flang/test/Driver/write-module.f90 @@ -1,17 +1,14 @@ -! RUN: rm -rf %t && mkdir -p %t/mod-dir && cd %t && %f18 -fparse-only %s -! RUN: ls %t/testmodule.mod && not ls %t/mod-dir/testmodule.mod +! RUN: rm -rf %t && mkdir -p %t/dir-flang +! RUN: cd %t && %flang -fsyntax-only -module-dir %t/dir-flang %s +! RUN: ls %t/dir-flang/testmodule.mod && not ls %t/testmodule.mod -! RUN: rm -rf %t && mkdir -p %t/mod-dir && cd %t && %f18 -fparse-only -module mod-dir %s -! RUN: ls %t/mod-dir/testmodule.mod && not ls %t/testmodule.mod +! RUN: rm -rf %t && mkdir -p %t/dir-flang +! RUN: cd %t && %flang -fsyntax-only -J %t/dir-flang %s +! RUN: ls %t/dir-flang/testmodule.mod && not ls %t/testmodule.mod -! RUN: rm -rf %t && mkdir -p %t/mod-dir && cd %t && %f18 -fparse-only -module-dir mod-dir %s -! RUN: ls %t/mod-dir/testmodule.mod && not ls %t/testmodule.mod - -! RUN: rm -rf %t && mkdir -p %t/mod-dir && cd %t && %f18 -fparse-only -J mod-dir %s -! RUN: ls %t/mod-dir/testmodule.mod && not ls %t/testmodule.mod - -! RUN: rm -rf %t && mkdir -p %t/mod-dir && cd %t && %f18 -fparse-only -Jmod-dir %s -! RUN: ls %t/mod-dir/testmodule.mod && not ls %t/testmodule.mod +! RUN: rm -rf %t && mkdir -p %t/dir-flang +! RUN: cd %t && %flang -fsyntax-only -J%t/dir-flang %s +! RUN: ls %t/dir-flang/testmodule.mod && not ls %t/testmodule.mod module testmodule type::t2 diff --git a/flang/test/Flang-Driver/write-module.f90 b/flang/test/Flang-Driver/write-module.f90 deleted file mode 100644 --- a/flang/test/Flang-Driver/write-module.f90 +++ /dev/null @@ -1,16 +0,0 @@ -! RUN: rm -rf %t && mkdir -p %t/dir-flang -! RUN: cd %t && %flang -fsyntax-only -module-dir %t/dir-flang %s -! RUN: ls %t/dir-flang/testmodule.mod && not ls %t/testmodule.mod - -! RUN: rm -rf %t && mkdir -p %t/dir-flang -! RUN: cd %t && %flang -fsyntax-only -J %t/dir-flang %s -! RUN: ls %t/dir-flang/testmodule.mod && not ls %t/testmodule.mod - -! RUN: rm -rf %t && mkdir -p %t/dir-flang -! RUN: cd %t && %flang -fsyntax-only -J%t/dir-flang %s -! RUN: ls %t/dir-flang/testmodule.mod && not ls %t/testmodule.mod - -module testmodule - type::t2 - end type -end diff --git a/flang/tools/f18/f18.cpp b/flang/tools/f18/f18.cpp --- a/flang/tools/f18/f18.cpp +++ b/flang/tools/f18/f18.cpp @@ -747,8 +747,7 @@ } if (!anyFiles) { - driver.measureTree = true; - driver.dumpUnparse = true; + driver.syntaxOnly = true; llvm::outs() << "Enter Fortran source\n" << "Use EOF character (^D) to end file\n"; CompileFortran("-", options, driver, defaultKinds);