OpenMP-Examples/data_environment/fort_sp_common.tex
2021-08-17 09:11:55 -07:00

40 lines
1.1 KiB
TeX

\pagebreak
\section{Fortran Restrictions on \code{shared} and \code{private} Clauses with Common Blocks}
\fortranspecificstart
\label{sec:fort_sp_common}
When a named common block is specified in a \code{private}, \code{firstprivate},
or \code{lastprivate} clause of a construct, none of its members may be declared
in another data-sharing attribute clause on that construct. The following examples
illustrate this point.
The following example is conforming:
\fnexample{fort_sp_common}{1}
The following example is also conforming:
\fnexample{fort_sp_common}{2}
% blue line floater at top of this page for "Fortran, cont."
%\begin{figure}[t!]
%\linewitharrows{-1}{dashed}{Fortran (cont.)}{8em}
%\end{figure}
\clearpage
The following example is conforming:
\fnexample{fort_sp_common}{3}
The following example is non-conforming because \code{x} is a constituent element
of \code{c}:
\fnexample{fort_sp_common}{4}
The following example is non-conforming because a common block may not be declared
both shared and private:
\fnexample{fort_sp_common}{5}
\fortranspecificend