1  /* { dg-do compile } */
       2  /* { dg-additional-options "-fopenmp -fdump-tree-gimple" } */
       3  
       4  struct bar
       5  {
       6    int num_vectors;
       7    double *vectors;
       8  };
       9  
      10  struct foo
      11  {
      12    int num_vectors;
      13    struct bar *bars;
      14    double **vectors;
      15  };
      16  
      17  void func (struct foo *f, int n, int m)
      18  {
      19    #pragma omp target enter data map (to: f->vectors[m][:n])
      20    #pragma omp target enter data map (to: f->bars[n].vectors[:m])
      21    #pragma omp target enter data map (to: f->bars[n].vectors[:f->bars[n].num_vectors])
      22  }
      23  
      24  /* { dg-final { scan-tree-dump-times "map\\(to:\\*_\[0-9\]+ \\\[len: _\[0-9\]+\\\]\\) map\\(attach:\[^-\]+->vectors \\\[bias: \[^\]\]+\\\]\\)" 3 "gimple" } } */