Open
Description
Here's a reproducer:
Program bug
Real :: x
Common /named_common/ x
x = 1.0
Call sub()
If (x/=1.0) Then
Print *,'FAIL common, x: ',x
Else
Print *,'ok'
End If
contains
Subroutine sub
Real :: x
Common /named_common/ x
!$OMP PARALLEL PRIVATE (/named_common/)
x = 2.0
!$OMP END PARALLEL
End Subroutine
End Program
If I compile and execute this program with the -fopenmp
option, I get the output:
FAIL common, x: 2.
Alternatively, gfortran produces the output:
ok