aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/goacc/update-1.c
blob: 701ef36364361b01f6ca27c92aff6304747e9867 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
void
f (void)
{
#pragma acc update /* { dg-error "'#pragma acc update' must contain at least one 'device' or 'host' or 'self' clause" } */

  int i = 0;
  int a[10];
#pragma acc update device(i)
#pragma acc update host(i)
#pragma acc update self(i)
#pragma acc update device(a[1:3])
#pragma acc update host(a[1:3])
#pragma acc update self(a[1:3])
#pragma acc update device(a(1:3)) /* { dg-error "expected '\\\)' before '\\\(' token" } */
#pragma acc update host(a(1:3)) /* { dg-error "expected '\\\)' before '\\\(' token" } */
#pragma acc update self(a(1:3)) /* { dg-error "expected '\\\)' before '\\\(' token" } */
}