llvm-project/flang/test/Preprocessing/compiler_defined_macros.F90
Camille Coti b11c527816 [flang] Version information in flang/f18
Fixed some version information in flang/f18:

  - fixed the behavior of the -v switch: this flag enables verbosity with used with arguments, but just displays the version when used alone (related to this bug: https://bugs.llvm.org/show_bug.cgi?id=46017)
 - added __FLANG, __FLANG_MAJOR__, __FLANG_MINOR__ and __FLANG_PATCHLEVEL__ (similar to their __F18* counterparts) for compatibility purpose

Reviewed By: AlexisPerry, richard.barton.arm, tskeith

Differential Revision: https://reviews.llvm.org/D84334
2020-09-01 19:05:43 +01:00

12 lines
400 B
Fortran

! Check that the macros that give the version number are set properly
!CHECK: flang_major = {{[1-9][0-9]*$}}
!CHECK: flang_minor = {{[0-9]+$}}
!CHECK: flang_patchlevel = {{[0-9]+$}}
!RUN: %f18 -E %s | FileCheck --ignore-case %s
integer, parameter :: flang_major = __flang_major__
integer, parameter :: flang_minor = __flang_minor__
integer, parameter :: flang_patchlevel = __flang_patchlevel__