| Issue |
71369
|
| Summary |
[Flang][OpenMP] execution error when pointer variable with `private` attribute is output in `task` construct
|
| Labels |
flang:frontend,
flang:openmp
|
| Assignees |
|
| Reporter |
ohno-fj
|
```
Version of flang-new : 18.0.0(1c876ff5155c4feeb2b2885eb3e6abda17c4b7f4)
```
When pointer variable with `private` attribute is output in `task` construct, execution terminates abnormally.
The following are the test program, Flang-new, Gfortran and ifort compilation result.
snes_task_016_2.f90:
```fortran
PROGRAM main
INTEGER, TARGET ::A,B=0
INTEGER, POINTER ::P
call omp_set_num_threads(2)
A=100
B=50
!$OMP PARALLEL PRIVATE(P)
P=>A
!$OMP TASK
PRINT '("[TSK-1] P=",i3)',P
P=>B
!$OMP END TASK
!$OMP END PARALLEL
end PROGRAM main
```
```
$ flang-new snes_task_016_2.f90 -fopenmp; ./a.out
[TSK-1] P=100
Segmentation fault
$
```
```
$ gfortran snes_task_016_.f90 -fopenmp; ./a.out
[TSK-1] P=100
[TSK-1] P=100
$
```
```
$ ifort snes_task_016_.f90 -qopenmp; ./a.out
[TSK-1] P=100
[TSK-1] P=100
$
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs