aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/gomp/error-2.c
blob: 4e13f03ec8de1d1f71bbf8b5428e3fc0b3390959 (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
void
foo (int x, const char *msg1, const char *msg2)
{
  if (x == 0)
    {
      #pragma omp error at(execution)
    }
  else if (x == 1)
    {
      #pragma omp error severity (warning), at (execution)
    }
  else if (x == 2)
    {
      #pragma omp error at ( execution ) severity (fatal) message ("baz")
    }
  else if (x == 3)
    {
      #pragma omp error severity(warning) message (msg1) at(execution)
    }
  else
    {
      #pragma omp error message (msg2), at(execution), severity(fatal)
    }
}