xref: /openbsd-src/gnu/gcc/libgomp/testsuite/libgomp.c/single-2.c (revision 404b540a9034ac75a6199ad1a32d1bbc7a0d4210)
1*404b540aSrobert #include <stdlib.h>
2*404b540aSrobert 
3*404b540aSrobert int
main(void)4*404b540aSrobert main (void)
5*404b540aSrobert {
6*404b540aSrobert   int i;
7*404b540aSrobert   i = 4;
8*404b540aSrobert #pragma omp single copyprivate (i)
9*404b540aSrobert   {
10*404b540aSrobert     i = 6;
11*404b540aSrobert   }
12*404b540aSrobert   if (i != 6)
13*404b540aSrobert     abort ();
14*404b540aSrobert   return 0;
15*404b540aSrobert }
16