-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Closed
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorflang:frontendopenmp
Description
Version of flang-new : 17.0.0(0303eafcb34647f7d5a4015aad266b5766f5dc5e)
The same COMMON
block specified in two THREADPRIVATE
directives is a compile-time error.
The following are the test program, flang-new, GFortran and ifort compilation result.
omp30_example_a_25_04_.f90
:
program main
call A25_4_GOOD()
print *,'pass'
end program main
SUBROUTINE A25_4_GOOD()
COMMON /T/ A
!$OMP THREADPRIVATE(/T/)
integer :: A
A=100
call A25_4S_GOOD()
if (A.ne.101) print *,'err'
CONTAINS
SUBROUTINE A25_4S_GOOD()
COMMON /T/ A
!$OMP THREADPRIVATE(/T/)
integer :: A
!$OMP PARALLEL COPYIN(/T/)
A=A+1
!$OMP END PARALLEL
END SUBROUTINE A25_4S_GOOD
END SUBROUTINE A25_4_GOOD
$ flang-new -flang-experimental-exec -fopenmp omp30_example_a_25_04_.f90
error: Semantic errors in omp30_example_a_25_04_.f90
./omp30_example_a_25_04_.f90:16:22: error: 't' appears in more than one data-sharing clause on the same OpenMP directive
!$OMP THREADPRIVATE(/T/)
^
./omp30_example_a_25_04_.f90:18:24: error: Non-THREADPRIVATE object 'a' in COPYIN clause
!$OMP PARALLEL COPYIN(/T/)
^
$
$ gfortran -fopenmp omp30_example_a_25_04_.f90
$
$ ifort -qopenmp omp30_example_a_25_04_.f90
$
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorflang:frontendopenmp
Type
Projects
Status
Done