------- Comment #1 from dfranke at gcc dot gnu dot org  2007-06-25 20:09 -------
I think gfortran is correct ...


$> ifort -warn all -openmp pr32502.f
fortcom: Error: pr32502.f, line 6: Variables that appear on the FIRSTPRIVATE,
LASTPRIVATE, and REDUCTION clauses on a work-sharing directive must have shared
scope in the enclosing region   [PEAK]
!$omp do private(i), reduction(max:peak)
-----------------------------------^
compilation aborted for pr32502.f (code 1)


$> sunf95 -w3 -O3 -xopenmp pr32502.f

!$omp do private(i), reduction(max:peak)
                                   ^
"pr32502.f", Line = 6, Column = 36: ERROR: Variable "PEAK" appears in REDUCTION
clause. Therefore, it must be SHARED in the enclosing context.

f90comp: 10 SOURCE LINES
f90comp: 1 ERRORS, 0 WARNINGS, 0 OTHER MESSAGES, 0 ANSI


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dfranke at gcc dot gnu dot
                   |                            |org
   GCC host triplet|powerpc-apple-darwin8.8.0   |
           Keywords|                            |openmp


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32502

Reply via email to