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


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