1subroutine foo (x, msg1, msg2)
2  integer x
3  character(len=*) :: msg1, msg2
4  if (x == 0) then
5      !$omp error at(execution)
6  else if (x == 1) then
7      !$omp error severity (warning), at (execution)
8  else if (x == 2) then
9      !$omp error at ( execution ) severity (fatal) message ("baz")
10  else if (x == 3) then
11      !$omp error severity(warning) message (msg1) at(execution)
12  else
13      !$omp error message (msg2), at(execution), severity(fatal)
14  end if
15end
16