mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-13 13:45:16 +00:00
![Andrzej Warzynski](/assets/img/avatar_default.png)
`%flang-new` was introduced in the early days of the new driver to make a clear distinction between the tests for the current and the new driver. We have since introduced `%flang` (compiler driver) and `%flang_fc1` (frontend driver) as the long term solution. This has allowed us to share tests between `flang-new` and `f18`. This patch replaces all uses of `%flang-new` with `%flang` and `%flang_fc1`. Some tests are reformatted so that all tests look uniform and are easier to follow. Where possible, `! REQUIRES: new-flang-driver` is deleted so that more tests can be shared with `f18`. To facilitate this, `f{no-}implicit-none` are introduced in `f18` with semantics identical to `flang-new`. Two tests are deleted rather than updated: * flang/test/Frontend/print-preprocess-C-file.f90 * flang/test/Frontend/print-preprocessed-file.f90 Instead, there is plenty of preprocessor tests in flang/test/Preprocessing/. Differential Revision: https://reviews.llvm.org/D100174
27 lines
776 B
Fortran
27 lines
776 B
Fortran
! 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
|
|
|
|
!-----------
|
|
! 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
|