60bf575ccb
2017-12-30 Tom de Vries <tom@codesourcery.com> PR libgomp/83046 * omp-expand.c (expand_omp_target): If in_lto_p, mark offload_funcs with DECL_PRESERVE_P. * lto-streamer-out.c (prune_offload_funcs): New function. Remove offload_funcs entries that no longer have a corresponding cgraph_node. Mark the remaining ones as DECL_PRESERVE_P. (output_lto): Call prune_offload_funcs. * testsuite/libgomp.oacc-c-c++-common/pr83046.c: New test. * testsuite/libgomp.c-c++-common/pr83046.c: New test. From-SVN: r256045
26 lines
286 B
C
26 lines
286 B
C
/* { dg-do link } */
|
|
|
|
#define N 100
|
|
|
|
int
|
|
main ()
|
|
{
|
|
int a[N];
|
|
int i, x;
|
|
int c;
|
|
|
|
c = 1;
|
|
#pragma acc parallel loop
|
|
for (i = 0; i < 100; i++)
|
|
a[i] = 0;
|
|
|
|
if (c)
|
|
__builtin_unreachable ();
|
|
|
|
#pragma acc parallel loop
|
|
for (i = 0; i < 100; i++)
|
|
a[i] = 1;
|
|
|
|
return 0;
|
|
}
|