| 1 |
!RUN: %flang_fc1 -emit-hlfir -fopenmp %s -o - | FileCheck %s --check-prefixes=HOST,ALL |
| 2 |
!RUN: %flang_fc1 -emit-hlfir -fopenmp -fopenmp-is-target-device %s -o - | FileCheck %s --check-prefix=ALL |
| 3 |
|
| 4 |
PROGRAM main |
| 5 |
! HOST-DAG: %[[I_REF:.*]] = fir.alloca f32 {bindc_name = "i", uniq_name = "_QFEi"} |
| 6 |
! HOST-DAG: %[[I_DECL:.*]]:2 = hlfir.declare %[[I_REF]] {uniq_name = "_QFEi"} : (!fir.ref<f32>) -> (!fir.ref<f32>, !fir.ref<f32>) |
| 7 |
REAL :: I |
| 8 |
! ALL-DAG: fir.global internal @_QFEi {omp.declare_target = #omp.declaretarget<device_type = (any), capture_clause = (to)>} : f32 { |
| 9 |
! ALL-DAG: %[[UNDEF:.*]] = fir.undefined f32 |
| 10 |
! ALL-DAG: fir.has_value %[[UNDEF]] : f32 |
| 11 |
! ALL-DAG: } |
| 12 |
!$omp declare target(I) |
| 13 |
END |