aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/gomp/critical-4.c
blob: 530e7c976fcdc548ccdfb6bb742590a6c04c898f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* { dg-do compile } */

extern void bar(int);

void
foo1 (void)
{
  #pragma omp critical
  #pragma omp critical(foo)
  #pragma omp critical(bar)
    bar (0);
}

void
foo2 (void)
{
  #pragma omp critical
  #pragma omp critical		/* { dg-warning "with the same name" } */
    bar (0);
}

void
foo3 (void)
{
  #pragma omp critical(foo)
  #pragma omp critical(foo)	/* { dg-warning "with the same name" } */
    bar (0);
}