1506ae0e1e
2015-01-23 Tom de Vries <tom@codesourcery.com> PR libgomp/64707 * lto-opts.c (lto_write_options): Output non-explicit conservative -fno-openmp. * lto-wrapper.c (merge_and_complain): Handle merging -fopenmp. (append_compiler_options): Pass -fopenmp through. * c.opt (fopenmp): Mark as LTO option. * lang.opt (fopenmp): Mark as LTO option. * testsuite/libgomp.c/target-9.c: Add -ftree-parallelize-loops=0 to dg-options. From-SVN: r220037
38 lines
485 B
C
38 lines
485 B
C
/* { dg-do run } */
|
|
/* { dg-options "-O1 -ftree-parallelize-loops=0" } */
|
|
/* { dg-additional-options "-flto" { target lto } } */
|
|
|
|
#include <stdlib.h>
|
|
|
|
#define N 123456
|
|
|
|
#pragma omp declare target
|
|
int X, Y;
|
|
#pragma omp end declare target
|
|
|
|
void
|
|
foo ()
|
|
{
|
|
#pragma omp target map(alloc: X)
|
|
X = N;
|
|
}
|
|
|
|
int
|
|
main ()
|
|
{
|
|
int res;
|
|
|
|
foo ();
|
|
|
|
#pragma omp target map(alloc: X, Y) map(from: res)
|
|
{
|
|
Y = N;
|
|
res = X + Y;
|
|
}
|
|
|
|
if (res != N + N)
|
|
abort ();
|
|
|
|
return 0;
|
|
}
|