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: "spam dot brian dot taylor at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Jun 2007 22:20:19 -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 #4 from spam dot brian dot taylor at gmail dot com 2007-06-25 22:20 -------
Looks like you are correct. I believe the relevant section of the OpenMP API
standard is 2.8.1.2 ("Sharing Attribute Rules for Variables Referenced in a
Region, but not in a Construct"), lines 25-35 on p. 65 and line 1 on p. 66.
The short version is that a local variable such as "peak" in the example is
private by default, but can be made shared by giving it the save attribute.
After this change gfortran is able to compile my code.
Sorry for the noise. :-) Please close this PR.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32502