struct-elem-5.c 476 B

1234567891011121314151617181920
  1. /* { dg-do run { target offload_device_nonshared_as } } */
  2. struct S
  3. {
  4. int a, b, c;
  5. };
  6. typedef struct S S;
  7. int main (void)
  8. {
  9. S s;
  10. #pragma omp target data map (alloc: s.a, s.c)
  11. {
  12. #pragma omp target enter data map (alloc: s.b)
  13. }
  14. return 0;
  15. }
  16. /* { dg-output "Trying to map into device \\\[\[0-9a-fA-FxX\]+..\[0-9a-fA-FxX\]+\\\) structure element when other mapped elements from the same structure weren't mapped together with it" } */
  17. /* { dg-shouldfail "" } */