------- Comment #4 from burnus at gcc dot gnu dot org 2009-07-28 14:43 ------- (In reply to comment #1) > I certainly can't reproduce any kind of segfault with this.
Neither can I. Regarding both examples (comment 0 and comment 1), ifort 11.1 happily accepts both. I am not sure whether it is the correct interpretation according the standard, but http://publib.boulder.ibm.com/infocenter/lnxpcomp/v9v111/topic/com.ibm.xlf111.linux.doc/xlfopg/smpdirclauses.htm has: "The following example demonstrates the proper use of a PRIVATE variable that is used to define a statement function. A commented line shows the invalid use. Since J appears in a statement function, the statement function cannot be referenced within the parallel construct for which J is PRIVATE. INTEGER :: ARR(10), J = 17 ISTFNC() = J !$OMP PARALLEL DO PRIVATE(J) DO I = 1, 10 J=I ARR(I) = J ! ARR(I) = ISTFNC() **ERROR** A reference to ISTFNC would ! make the PRIVATE(J) clause ! invalid. END DO PRINT *, ARR END " However, I somehow read the standard differently such that already the "PRIVATE(J)" is invalid. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40876