Projet_SETI_RISC-V/riscv-gnu-toolchain/gcc/libgomp/testsuite/libgomp.c/sections-2.c

30 lines
349 B
C
Raw Normal View History

2023-03-06 14:48:14 +01:00
/* { 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;
}