You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Flang][OpenMP] Execution error (Segmentation fault) when an allocatable array is used in task construct with a firstprivate clause in a parallel construct with a private clause #86621
Version of flang-new : 19.0.0(cbcdf126ccc774c063b5d5140c1393ff5305dded)/AArch64
When an allocatable array is used in task construct with a firstprivate clause in a parallel construct with a private clause, the execution terminates abnormally (Segmentation fault).
Execution terminates normally in the following cases:
Array (a) is not an allocatable array, or
Do not write task construct
The following are the test program, Flang-new, Gfortran and ifort compilation/execution result.
omp3_task_firstprivate_013_232.f90:
program main
integer(4),allocatable::a(:)
allocate(a(10))
a(9)=100
!$omp parallel private(a)
!$omp task firstprivate(a)
a(9)=10
!$omp end task
!$omp end parallel
write(6,*) "a(9) = ", a(9)
end program main