Debian Codegraph @

gcc/testsuite/g++.dg/gomp/map-lvalue-ref-1.C

raw
1 // { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
2
3 #include <cassert>
4
5 int glob = 10;
6
7 int& foo ()
8 {
9 return glob;
10 }
11
12 int main (int argc, char *argv[])
13 {
14 #pragma omp target map(foo())
15 /* { dg-message {sorry, unimplemented: unsupported map expression 'foo\(\)'} "" { target *-*-* } .-1 } */
16 {
17 foo()++;
18 }
19 assert (glob == 11);
20 return 0;
21 }