00001 /* { dg-do compile } */ 00002 00003 #include <stdio.h> 00004 #include <stdlib.h> 00005 #include <omp.h> 00006 omp_lock_t * 00007 new_lock () 00008 { 00009 omp_lock_t *lock_ptr; 00010 #pragma omp single copyprivate(lock_ptr) 00011 { 00012 lock_ptr = (omp_lock_t *) malloc (sizeof (omp_lock_t)); 00013 omp_init_lock (lock_ptr); 00014 } 00015 return lock_ptr; 00016 }