This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/32502] Rejects valid OpenMP code due to orphaned construct with reduction clause
- From: "dfranke at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Jun 2007 20:09:25 -0000
- Subject: [Bug fortran/32502] Rejects valid OpenMP code due to orphaned construct with reduction clause
- References: <bug-32502-12305@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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