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