aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/gomp/attrs-metadirective-8.c
blob: 43746b669ffd41160276b79e993ca4c11380ef0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* { dg-do compile { target { c || c++11 } } } */
/* { dg-options "-fopenmp -std=c23" { target { c } } } */

#define N 256

void
f (void)
{
  int i;
  int a[N];

  [[omp::directive (metadirective
      when( device={kind(nohost)}: nothing )
      when( device={arch("nvptx")}: nothing)
      default( parallel for))]]
    for (i = 0; i < N; i++)
      a[i] = i;
}