Debian Codegraph @

gcc/testsuite/g++.dg/gomp/dispatch-5.C

raw
1 /* { dg-do compile } */
2
3 /* Check that the parser does not issue an error when a variant returns a
4 reference. */
5
6 int& variant_fn();
7
8 #pragma omp declare variant(variant_fn) match(construct={target})
9 int& bar();
10
11 void sub(int a)
12 {
13 #pragma omp dispatch
14 bar();
15 #pragma omp dispatch
16 a = bar();
17 }