Skip to content

[flang] OpenMP default private clause does not work as expected #78165

Closed
@shivaramaarao

Description

@shivaramaarao

consider the following program

PROGRAM main
INTEGER:: NEL
!$OMP PARALLEL DO DEFAULT(PRIVATE) !PRIVATE(NEL)
DO I=1, 4
NEL=I
PRINT *, I, NEL
ENDDO
!$OMP END PARALLEL DO
END PROGRAM

$flang-new -fopenmp test.f90
$a.out
2 4
4 4
3 4
1 4

NEL variable is expected to be private, but it is not considered so. uncommenting PRIVATE(NEL) clause makes the program work.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions