[flang-commits] [flang] [Flang][OpenMP] Data-sharing restrictions on assumed-size arrays (PR #189324)

Phoebe Linck via flang-commits flang-commits at lists.llvm.org
Wed Apr 8 11:17:39 PDT 2026


phi-bee wrote:

@Stylie777
I had some trouble building it, but I've done so now.

My patch introduces a semantics error on this Fujitsu test: https://github.com/fujitsu/compiler-test-suite/blob/main/Fortran/0966/0966_0003.f90

However, I don't think it indicates a problem with my patch. The test is nonconforming, since it lists assumed-size array `A` in a `firstprivate` clause:
```
SUBROUTINE SUB(A)
  INTEGER,DIMENSION(*):: A
  PRINT '("S-***-1: LOC(A)=",z17.16," A=[ ",i2," ",i2," ",i2," ",i2," ]")',LOC(A),A(1),A(2),A(3),A(4)
  !$OMP TASK FIRSTPRIVATE(A)
    PRINT '("S-TSK-1: LOC(A)=",z17.16," A=[ ",i2," ",i2," ",i2," ",i2," ]")',LOC(A(1)),A(1),A(2),A(3),A(4)
    DO I=1,4
       A(I)=30
    END DO
    PRINT '("S-TSK-2: LOC(A)=",z17.16," A=[ ",i2," ",i2," ",i2," ",i2," ]")',LOC(A(1)),A(1),A(2),A(3),A(4)
  !$OMP END TASK
  !$OMP TASKWAIT
  PRINT '("S-***-2: LOC(A)=",z17.16," A=[ ",i2," ",i2," ",i2," ",i2," ]")',LOC(A),A(1),A(2),A(3),A(4)
END SUBROUTINE SUB
```

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


More information about the flang-commits mailing list