[test] Fix compiler_version.f90 for -DLLVM_APPEND_VC_REV=OFF builds after D152572
authorFangrui Song <i@maskray.me>
Sat, 22 Jul 2023 23:06:29 +0000 (16:06 -0700)
committerFangrui Song <i@maskray.me>
Sat, 22 Jul 2023 23:06:29 +0000 (16:06 -0700)
Checking the patch version is too strict. Just check major and minor
versions as in clang/test/Driver/immediate-options.c.

flang/test/Evaluate/compiler_version.f90

index db64e83..070b973 100644 (file)
@@ -4,7 +4,7 @@ program main
     use ISO_FORTRAN_ENV, only: compiler_version
     implicit none
     character (len = :), allocatable :: v
-! CHECK: v="{{.*}}flang version {{[0-9]*.[0-9]*.[0-9]}} {{.*}}"
+! CHECK: v="{{.*}}flang version {{[0-9]+\.[0-9.]+.*}}"
     v = compiler_version()
     print *, v
     deallocate(v)