Sun Studio 12 Update 1: OpenMP API User's Guide

5.2 Data Environment

The task directive takes the following data attribute clauses that define the data environment of the task:

All references within a task to a variable listed in the shared clause refer to the variable with that same name known immediately prior to the task directive.

For each private and firstprivate variable, new storage is created and all references to the original variable in the lexical extent of the task construct are replaced by references to the new storage. A firstprivate variable is initialized with the value of the original variable at the moment the task is encountered.

The data-sharing attributes of variables that are not listed in data attribute clauses of a task construct, and are not predetermined according to the OpenMP rules, are implicitly determined as follows:

It follows that: