The reference compiler allows this use case. Note that writing to this variable would result in CUDA error.
omp.loop