Here are the known limitations to autoscoping in the current Sun Studio Fortran 95 compiler.
Only OpenMP directives are recognized and used in the analysis. Calls to OpenMP runtime routines are not recognized. For example, if a program uses OMP_SET_LOCK() and OMP_UNSET_LOCK() to implement a critical section, the compiler is not able to detect the existence of the critical section. Use CRITICAL and END CRITICAL directives if possible.
Only synchronizations specified by using OpenMP synchronization directives, such as BARRIER and MASTER, are recognized and used in the analysis. User-implemented synchronizations, such as busy-waiting, are not recognized.
Autoscoping is not supported when compiling with -xopenmp=noopt.