testsuite/libgomp.c/atomic-4.c

Go to the documentation of this file.
00001 /* PR middle-end/35611 */
00002 /* { dg-options "-O2" } */
00003 
00004 extern void abort (void);
00005 
00006 int
00007 main (void)
00008 {
00009   long double d = .0L;
00010   int i;
00011   #pragma omp parallel for shared (d)
00012     for (i = 0; i < 1000; i++)
00013       #pragma omp atomic
00014     d += 1.0L;
00015   if (d != 1000.0L)
00016     abort ();
00017   return 0;
00018 }

Generated on Fri Apr 5 05:38:10 2013 for Libgomp by  doxygen 1.4.7