[gomp4] privatize internal array variables introduced by the fortran FE
Cesar Philippidis
cesar@codesourcery.com
Tue Oct 13 20:12:00 GMT 2015
Arrays in fortran have a couple of internal variables associated with
them, e.g. stride, lbound, ubound, size, etc. Depending on how and where
the array was declared, these internal variables may be packed inside an
array descriptor represented by a struct or defined individually. The
major problem with this is that kernels and parallel regions with
default(none) will generate errors if those internal variables are
defined individually since the user has no way to add clauses to them. I
suspect this is also true for arrays inside omp target regions.
My fix for this involves two parts. First, I reinitialize those private
array variables which aren't associated with array descriptors at the
beginning of the parallel/kernels region they are used in. Second, I
added OMP_CLAUSE_PRIVATE for those internal variables.
I'll apply this patch to gomp-4_0-branch shortly.
Is there any reason why only certain arrays have array descriptors? The
arrays with descriptors don't have this problem. It's only the ones
without descriptors that leak new internal variables that cause errors
with default(none).
Cesar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gfc_array_privatization.diff
Type: text/x-patch
Size: 11924 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20151013/900427b7/attachment.bin>
More information about the Fortran
mailing list