- 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 behaviormlir:openmp
Description
Here's a test program:
program bug use omp_lib implicit none integer ivar real :: table(10) !$OMP PARALLEL NUM_THREADS(3) PRIVATE(table) table = 1 !$OMP PARALLEL NUM_THREADS(3) SHARED(table) !$OMP DO LASTPRIVATE(table) do ivar=1,size(table) table(:ivar) = ivar*5 end do !$OMP END PARALLEL if (any(table/=size(table)*5)) then stop 'fail 3' end if !$OMP END PARALLEL print *,'ok' End Program Here's my compilation command -- flang-new -g -fopenmp -fopenmp-version=31 bug.f90
When I execute the result, I get the output:
Fortran STOP: fail 3 Fortran STOP: fail 3 When I compile this with gfortran (gfortran -fopenmp bug.f90) or ifort (ifort -fopenmp -qopenmp-lib=compat bug.f90), I get the output:
ok Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviormlir:openmp