[Omp] PARALLEL DO REDUCTION of array-valued variables?
Jakub Jelinek
jakub at redhat.com
Mon Oct 30 08:37:40 PST 2006
On Mon, Oct 30, 2006 at 07:57:37AM -0800, Hoeflinger, Jay P wrote:
> This is not a valid Fortran program. You have declared the function to
> have an array-valued return value, but then use the function name (func)
> as a scalar inside the function. The function doesn't define an array
AFAICS there is no use of func as scalar in the testcase.
func = 0 and func = func + 1 are both array operations, func isn't
assumed-size nor allocatable array and therefore is valid in a reduction
clause too.
> Also, no value is assigned to n, so you have no guarantee on
> the number of iterations for the DO loop.
Yes, this is an obvious bug in the testcase, but fixing that is trivial.
Jakub
More information about the Omp
mailing list