[Bug fortran/85364] -fopenmp should not put array in program on the stack
anlauf at gmx dot de
gcc-bugzilla@gcc.gnu.org
Thu Apr 12 21:39:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85364
Harald Anlauf <anlauf at gmx dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |anlauf at gmx dot de
--- Comment #4 from Harald Anlauf <anlauf at gmx dot de> ---
(In reply to Jakub Jelinek from comment #3)
> If it is about variables in MAIN__ and not say variables inside of BLOCK
> inside of MAIN__, then perhaps. For BLOCK, I wonder about stuff like:
> !$omp parallel
> block
> integer :: i
> i = ...
> use (i)
> end block
> !$omp end parallel
> end
> and similar, where the implicit SAVE would be undesirable.
The OpenMP data sharing rules are quite clear about this, even if they do
not mention Fortran BLOCK explicitly:
E.g. TR6, 2.20.1.2:
Local variables declared in called routines in the region and that have the
save attribute, or that are data initialized, are shared unless they appear
in a threadprivate directive.
More information about the Gcc-bugs
mailing list