aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/gomp/begin-declare-target-1.c
blob: fd8cabaef0a73dbcb8033fb0d01bb1088c6746f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* { dg-do compile } */
/* { dg-options "-fopenmp" } */

extern int a;
#pragma omp begin declare target device_type (host)
int b;
#pragma omp begin declare target device_type (any)
char d;
#pragma omp end declare target
#pragma omp end declare target
#pragma omp begin declare target
long c;
#pragma omp end declare target
#pragma omp declare target
int foo (void) { return 0; }
#pragma omp begin declare target device_type (any)
int bar (void) { return 0; }
#pragma omp end declare target
#pragma omp end declare target
#pragma omp begin declare target device_type (any)
int baz (void) { return 0; }
#pragma omp declare target
int qux (void) { return 0; }
#pragma omp end declare target
#pragma omp end declare target