This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/32502] Rejects valid OpenMP code due to orphaned construct with reduction clause



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]