This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
OpenMP private variable initialization
- From: MARGUINAUD Philippe <philippe dot marguinaud at meteo dot fr>
- To: fortran at gcc dot gnu dot org
- Date: Thu, 28 Mar 2013 09:48:17 +0100
- Subject: OpenMP private variable initialization
Hi all,
I have a problem with the initialization of a private variable in an
OpenMP loop. I do not know whether this is really a bug, but I would
have expected a different behaviour.
$ cat a.F90
MODULE A
TYPE TA
INTEGER :: ILMESS = 1024
END TYPE
END MODULE
$ cat main.F90
PROGRAM MAIN
USE A
TYPE (TA) :: YA
PRINT *, YA%ILMESS
!$OMP PARALLEL PRIVATE (YA)
PRINT *, YA%ILMESS
!$OMP END PARALLEL
END PROGRAM
$ gfortran -fopenmp a.F90 main.F90 -o main-GNU472.x
$ ./main-GNU472.x
1024
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...
What do you think ? Is this a bug or does it conform to the standard ?
Best regards,
Philippe