OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [libgomp/] [testsuite/] [libgomp.c/] [pr35549.c] - Blame information for rev 850

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

Line No. Rev Author Line
1 273 jeremybenn
/* PR middle-end/35549 */
2
/* { dg-do run } */
3
 
4
#include <omp.h>
5
#include <stdlib.h>
6
 
7
int
8
main (void)
9
{
10
  int i = 6, n = 0;
11
  omp_set_dynamic (0);
12
  omp_set_nested (1);
13
  #pragma omp parallel shared (i) num_threads (3)
14
  {
15
    if (omp_get_num_threads () != 3)
16
      #pragma omp atomic
17
        n += 1;
18
    #pragma omp parallel shared (i) num_threads (4)
19
    {
20
      if (omp_get_num_threads () != 4)
21
        #pragma omp atomic
22
          n += 1;
23
      #pragma omp critical
24
        i += 1;
25
    }
26
  }
27
  if (n == 0 && i != 6 + 3 * 4)
28
    abort ();
29
  return 0;
30
}

powered by: WebSVN 2.1.0

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