Mercurial > hg > CbC > CbC_gcc
annotate libgomp/testsuite/libgomp.c-c++-common/unmap-infinity-2.c @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 1830386684a0 |
children |
rev | line source |
---|---|
145 | 1 int foo[16]; |
2 #pragma omp declare target (foo) | |
3 | |
4 __attribute__((used)) void bar (void) | |
5 { | |
6 #pragma omp target parallel for | |
7 for (int i = 0; i < 16; i++) | |
8 foo[i] = i; | |
9 } | |
10 | |
11 int | |
12 main (int argc, char *argv[]) | |
13 { | |
14 int *foo_copy = foo; | |
15 /* Try to trigger the unmapping of a REFCOUNT_INFINITY target block. This | |
16 does nothing at the time of writing. */ | |
17 #pragma omp target exit data map(delete: foo_copy[0:16]) | |
18 return 0; | |
19 } |