!REQUIRES: amdgpu-registered-target, nvptx-registered-target !RUN: %flang_fc1 -emit-hlfir -triple amdgcn-amd-amdhsa -target-cpu gfx908 -fopenmp -fopenmp-is-target-device %s -o - | FileCheck %s !RUN: %flang_fc1 -emit-hlfir -triple nvptx64-nvidia-cuda -target-cpu sm_80 -fopenmp -fopenmp-is-target-device %s -o - | FileCheck --check-prefix=NVPTX %s !=============================================================================== ! Target_Enter Simple !=============================================================================== !CHECK: omp.target = #omp.target !NVPTX: omp.target = #omp.target !CHECK-LABEL: func.func @_QPomp_target_simple() subroutine omp_target_simple ! Directive needed to prevent subroutine from being filtered out when ! compiling for the device. !$omp declare target end subroutine omp_target_simple