From 266ddafc6858c38e2009e1d88cf99e335ac0c714 Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Thu, 13 Jul 2017 10:38:11 +0000 Subject: [PATCH] [GOMP] Fix (un)tied tasks with the GCC The first bit is actually the "untied" flag. That is why the condition was wrong and has to be inverted to set the flag correctly. Found and initial patch by Simon Convent! llvm-svn: 307899 --- openmp/runtime/src/kmp_gsupport.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openmp/runtime/src/kmp_gsupport.cpp b/openmp/runtime/src/kmp_gsupport.cpp index 2eca4975bb25..be9d0a21b7f4 100644 --- a/openmp/runtime/src/kmp_gsupport.cpp +++ b/openmp/runtime/src/kmp_gsupport.cpp @@ -847,8 +847,8 @@ void xexpand(KMP_API_NAME_GOMP_TASK)(void (*func)(void *), void *data, KA_TRACE(20, ("GOMP_task: T#%d\n", gtid)); - // The low-order bit is the "tied" flag - if (gomp_flags & 1) { + // The low-order bit is the "untied" flag + if (!(gomp_flags & 1)) { input_flags->tiedness = 1; } // The second low-order bit is the "final" flag