[flang-commits] [flang] [flang][OpenMP] Fix regression in !$ continuation (PR #134756)

Robert Imschweiler via flang-commits flang-commits at lists.llvm.org
Mon Apr 14 08:45:09 PDT 2025


ro-i wrote:

This commit (https://github.com/llvm/llvm-project/commit/0ae9bb96d5af47a2426596dbd0c35e3ff0cdddcc) breaks building a SPEC openmp benchmark (https://www.spec.org/auto/omp2012/Docs/357.bt331.html). A reduced test case:
```fortran
program BT
!$     integer  omp_get_max_threads
!$     external omp_get_max_threads

c---------------------------------------------------------------------
       write(*, '(A1)') ' '
       end
```
This leads to the following compile error:
```
$ flang -fopenmp -c bt.condcomp.f
error: Could not parse bt.condcomp.f
./bt.condcomp.f:1:1: warning: Character in fixed-form label field must be a digit
  program BT
  ^
./bt.condcomp.f:5:6: error: expected end of statement
  c---------------------------------------------------------------------
       ^
./bt.condcomp.f:3:8: in the context: specification construct
  !$     external omp_get_max_threads
         ^
./bt.condcomp.f:2:8: in the context: specification part
  !$     integer  omp_get_max_threads
         ^
```

https://github.com/llvm/llvm-project/pull/134756


More information about the flang-commits mailing list