Commit 4befd127 by Jakub Jelinek Committed by Jakub Jelinek

omp-low.c (expand_omp_sections): Always pass len - 1 to GOMP_sections_start,…

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
parent 0e1a966a
2013-09-19 Jakub Jelinek <jakub@redhat.com>
* omp-low.c (expand_omp_sections): Always pass len - 1 to
GOMP_sections_start, even if !exit_reachable.
2013-09-18 Vladimir Makarov <vmakarov@redhat.com>
* lra-constraints.c (need_for_all_save_p): Use macro
......
......@@ -5869,8 +5869,7 @@ expand_omp_sections (struct omp_region *region)
{
/* If we are not inside a combined parallel+sections region,
call GOMP_sections_start. */
t = build_int_cst (unsigned_type_node,
exit_reachable ? len - 1 : len);
t = build_int_cst (unsigned_type_node, len - 1);
u = builtin_decl_explicit (BUILT_IN_GOMP_SECTIONS_START);
stmt = gimple_build_call (u, 1, t);
}
......
2013-09-19 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.c/sections-2.c: New test.
2013-06-28 Marcus Shawcroft <marcus.shawcroft@arm.com>
* testsuite/libgomp.fortran/strassen.f90:
......
/* { 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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment