OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [libgomp/] [testsuite/] [libgomp.c/] [pr34513.c] - Rev 533

Go to most recent revision | Compare with Previous | Blame | View Log

/* PR c++/34513 */
/* { dg-do run } */
 
#include <omp.h>
 
extern void abort ();
 
static int errors = 0;
static int thrs = 4;
 
int
main ()
{
  omp_set_dynamic (0);
 
  #pragma omp parallel num_threads (thrs)
  {
    static int shrd = 0;
 
    #pragma omp atomic
      shrd += 1;
 
    #pragma omp barrier
 
    if (shrd != thrs)
      #pragma omp atomic
	errors += 1;
  }
 
  if (errors)
    abort ();
  return 0;
}
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.