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

            Bug ID: 94140
           Summary: [OpenACC] declare directive in class currently
                    rejected
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Keywords: openacc, rejects-valid
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
  Target Milestone: ---

The following test case gives:
   error: ‘foo::A’ is not a variable in ‘map’ clause

>From the wording, it seems to be valid and pg++ accepts and runs it (only tried
on shared memory).


#include <openacc.h>
#include <stdlib.h>

class foo {
  public:
    int A[3];
#pragma acc declare copyin(A)
};

int main () {
  class foo var;
  if (!acc_is_present (var.A, sizeof (var.A)))
    abort ();
  return 0;
}

Reply via email to