694e5e4bae
2015-12-02 Tom de Vries <tom@codesourcery.com> * tree-ssa-structalias.c (find_func_aliases_for_builtin_call) (find_func_clobbers, ipa_pta_execute): Handle BUILT_IN_GOACC_PARALLEL. * c-c++-common/goacc/kernels-alias-ipa-pta-2.c: New test. * c-c++-common/goacc/kernels-alias-ipa-pta-3.c: New test. * c-c++-common/goacc/kernels-alias-ipa-pta.c: New test. From-SVN: r231169
27 lines
461 B
C
27 lines
461 B
C
/* { dg-additional-options "-O2 -fipa-pta" } */
|
|
|
|
#include <stdlib.h>
|
|
|
|
#define N 2
|
|
|
|
int
|
|
main (void)
|
|
{
|
|
unsigned int *a = (unsigned int *)malloc (N * sizeof (unsigned int));
|
|
unsigned int *b = a;
|
|
unsigned int *c = (unsigned int *)malloc (N * sizeof (unsigned int));
|
|
|
|
#pragma acc kernels pcopyout (a[0:N], b[0:N], c[0:N])
|
|
{
|
|
a[0] = 0;
|
|
b[0] = 1;
|
|
c[0] = a[0];
|
|
}
|
|
|
|
if (a[0] != 1 || b[0] != 1 || c[0] != 1)
|
|
abort ();
|
|
|
|
free (a);
|
|
free (c);
|
|
}
|