https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110706

            Bug ID: 110706
           Summary: [OpenMP] C++ class mapping fails to map reference-type
                    members
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: openmp, wrong-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
  Target Milestone: ---

I probably get the syntax slightly wrong – and the example is stupid, but it
looks as if reference types do not get mapped but they should:

#pragma omp target enter data \
  map(to:*this.0_1 [len: 16]) \
  map(attach:this [bias: 0])

// ------------

struct T {
  int A[5];
};

static struct T y;

struct T2 {
  struct T &t = y;
  int x;
  T2 () : x(5) { }
void foo() {
  #pragma omp target enter data map(to:this[:1])
}
};

static struct T2 x;

int main() {
 x.foo();
}

Reply via email to