forked from OSchip/llvm-project
[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
This commit is contained in:
parent
1b2bd2680b
commit
0c9516b36c
|
@ -4,7 +4,7 @@
|
|||
#include <omp.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
__attribute__ ((noinline)) // workaround for bug in icc
|
||||
void print_task_type(int id)
|
||||
{
|
||||
#pragma omp critical
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include "callback.h"
|
||||
#include <omp.h>
|
||||
|
||||
__attribute__ ((noinline)) // workaround for bug in icc
|
||||
void print_task_type(int id)
|
||||
{
|
||||
#pragma omp critical
|
||||
|
|
Loading…
Reference in New Issue