[flang-commits] [flang] [Flang][OpenMP] Parse and semantically analyze common blocks in map clauses correctly (PR #89847)
via flang-commits
flang-commits at lists.llvm.org
Tue Apr 23 17:04:08 PDT 2024
================
@@ -2,16 +2,20 @@
! Check OpenMP MAP clause validity. Section 5.8.3 OpenMP 5.2.
subroutine sb(arr)
+ implicit none
real(8) :: arr(*)
real :: a
-
+ integer:: b, c, i
+ common /var/ b, c
+
!ERROR: Assumed-size whole arrays may not appear on the MAP clause
!$omp target map(arr)
do i = 1, 100
a = 3.14
enddo
!$omp end target
+ !ERROR: Assumed-size array 'arr' must have explicit final subscript upper bound value
----------------
agozillon wrote:
Annoying ping for you @mjklemm I think it's correct for us to emit an error in this case (OpenMP section syntax falls-back on fortran rules from my understanding and we also have the following OpenMP line: "The upper bound for the last dimension of an assumed-size dummy array must be specified", which I think covers this case but my Fortran and OpenMP knowledge is admittedly lacking), but just incase I thought I'd pester you for a double check!
https://github.com/llvm/llvm-project/pull/89847
More information about the flang-commits
mailing list