summaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.c/sections-2.c
blob: 38216befe0bca9be9f8a8f30bb425e81dfb7f5c2 (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
/* { dg-do run } */

#include <stdlib.h>
#include <unistd.h>

__attribute__((noinline, noclone, noreturn))
void
foo ()
{
  sleep (4);
  exit (0);
}

int
main ()
{
  #pragma omp parallel
  {
    #pragma omp sections
      {
        foo ();
      #pragma omp section
        foo ();
      #pragma omp section
        foo ();
      }
  }
  return 0;
}