\pagebreak
\section{\code{firstprivate} Clause and \code{sections} Construct}
\label{sec:fpriv_sections}
\index{constructs!sections@\code{sections}}
\index{sections construct@\code{sections} construct}
\index{constructs!section@\code{section}}
\index{section construct@\code{section} construct}
\index{clauses!firstprivate@\code{firstprivate}}
\index{firstprivate clause@\code{firstprivate} clause}

In the following example of the \code{sections} construct  the \code{firstprivate} 
clause is used to initialize the private copy of \code{section\_count} of each 
thread. The problem is that the \code{section} constructs modify \code{section\_count}, 
which breaks the independence of the \code{section} constructs. When different 
threads execute each section, both sections will print the value 1. When the same 
thread executes the two sections, one section will print the value 1 and the other 
will print the value 2. Since the order of execution of the two sections in this 
case is unspecified, it is unspecified which section prints which value. 

\cexample{fpriv_sections}{1}

\ffreeexample{fpriv_sections}{1}


