gcc/libgomp/testsuite/libgomp.c/sections-2.c
Jakub Jelinek 4befd127ca omp-low.c (expand_omp_sections): Always pass len - 1 to GOMP_sections_start, even if !exit_reachable.
* omp-low.c (expand_omp_sections): Always pass len - 1 to
	GOMP_sections_start, even if !exit_reachable.
libgomp/
	* testsuite/libgomp.c/sections-2.c: New test.

From-SVN: r202738
2013-09-19 13:52:52 +02:00

30 lines
349 B
C

/* { 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;
}