summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/gomp/task-1.C
blob: 0000e6f1fa9cd1f47cf7ac6fd88fe39885f9ab40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// { dg-do compile }
// { dg-options "-fopenmp" }

struct A { A (); ~A (); int i; };

template <typename T> void bar (T &);

const A a;

void foo (A &p)
{
  const A &q = a;
#pragma omp task	// { dg-error "has reference type" }
  bar (p);
#pragma omp task	// { dg-error "has reference type" }
  bar (q);
}