From 0c9516b36c90a2ef92ca04d457ff158052f8fde1 Mon Sep 17 00:00:00 2001 From: Joachim Protze Date: Wed, 17 Jan 2018 10:06:06 +0000 Subject: [OMPT] Add Workaround for Intel Compiler Bug Add Workaround for Intel Compiler Bug with Case#: 03138964 A critical region within a nested task causes a segfault in icc 14-18: int main() { #pragma omp parallel num_threads(2) #pragma omp master #pragma omp task #pragma omp task #pragma omp critical printf("test\n"); } When the critical region is in a separate function, the segault does not occur. So we add noinline to make sure that the function call stays there. Differential Revision: https://reviews.llvm.org/D41182 llvm-svn: 322622 --- openmp/runtime/test/ompt/tasks/task_types.c | 2 +- openmp/runtime/test/ompt/tasks/task_types_serialized.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'openmp/runtime') diff --git a/openmp/runtime/test/ompt/tasks/task_types.c b/openmp/runtime/test/ompt/tasks/task_types.c index 7a4f775cc48..77b82ee2571 100644 --- a/openmp/runtime/test/ompt/tasks/task_types.c +++ b/openmp/runtime/test/ompt/tasks/task_types.c @@ -4,7 +4,7 @@ #include #include - +__attribute__ ((noinline)) // workaround for bug in icc void print_task_type(int id) { #pragma omp critical diff --git a/openmp/runtime/test/ompt/tasks/task_types_serialized.c b/openmp/runtime/test/ompt/tasks/task_types_serialized.c index dfd5598d24d..7726f5b0330 100644 --- a/openmp/runtime/test/ompt/tasks/task_types_serialized.c +++ b/openmp/runtime/test/ompt/tasks/task_types_serialized.c @@ -4,6 +4,7 @@ #include "callback.h" #include +__attribute__ ((noinline)) // workaround for bug in icc void print_task_type(int id) { #pragma omp critical -- cgit v1.2.3