120a01d160
If we compile the openacc testcase with -fopenacc -O2, we run into a SIGSEGV or assert. The root cause for this is that pass_thread_jumps breaks the invariant that OACC_FORK and OACC_JOIN mark the start and end of a single-entry-single-exit region. Fix this by bailing out when encountering an IFN_UNIQUE in thread_jumps::profitable_jump_thread_path. Bootstrapped and reg-tested on x86_64. Build and reg-tested libgomp on x86_64 with nvptx accelerator. 2019-06-15 Tom de Vries <tdevries@suse.de> PR tree-optimization/90009 * tree-ssa-threadbackward.c (thread_jumps::profitable_jump_thread_path): Return NULL if bb contains IFN_UNIQUE. * testsuite/libgomp.oacc-c-c++-common/pr90009.c: New test. From-SVN: r272321
35 lines
401 B
C
35 lines
401 B
C
/* { dg-do run } */
|
|
|
|
#include <stdlib.h>
|
|
|
|
#define N 100
|
|
|
|
int data[N];
|
|
|
|
int
|
|
main (void)
|
|
{
|
|
int n = N, b = 3;
|
|
#pragma acc parallel num_workers(2)
|
|
{
|
|
int c;
|
|
if (n)
|
|
c = 0;
|
|
else
|
|
c = b;
|
|
|
|
#pragma acc loop worker
|
|
for (int i = 0; i < n; i++)
|
|
data[i] = 1;
|
|
|
|
if (c)
|
|
data[0] = 2;
|
|
}
|
|
|
|
for (int i = 0; i < n; i++)
|
|
if (data[i] != 1)
|
|
abort ();
|
|
|
|
return 0;
|
|
}
|