aboutsummaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.c-c++-common/nothing-1.c
blob: 69716b18d98cb272425d8cb4e63a97568b0f57b9 (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include <stdlib.h>

#pragma omp nothing

struct S
{
  #pragma omp nothing
  int s;
};

int
foo (int i)
{
  #pragma omp nothing
  if (0)
    #pragma omp nothing
    i++;
  if (1)
    ;
  else
    #pragma omp nothing
    i++;
  switch (0)
    #pragma omp nothing
    {
    default:
      break;
    }
  while (0)
    #pragma omp nothing
    i++;
  for (; 0;)
    #pragma omp nothing
    i++;
  lab:
  #pragma omp nothing
  i++;
  return i;
}

int
main ()
{
  if (foo (5) != 6 || foo (-2) != -1)
    abort ();
  return 0;
}