// RUN: fir-opt --lower-repack-arrays %s | FileCheck %s // Test the current implementation of #fir.acc_safe_temp_array_copy attribute. // It results in removal of fir.[un]pack_array operations. func.func @_QPtest(%arg0: !fir.box> {fir.bindc_name = "x"}) { %0 = fir.dummy_scope : !fir.dscope %1 = fir.pack_array %arg0 heap whole is_safe [#fir.acc_safe_temp_array_copy] : (!fir.box>) -> !fir.box> %2 = fir.declare %1 dummy_scope %0 {uniq_name = "_QFtestEx"} : (!fir.box>, !fir.dscope) -> !fir.box> fir.unpack_array %1 to %arg0 heap is_safe [#fir.acc_safe_temp_array_copy] : !fir.box> return } // CHECK-LABEL: func.func @_QPtest( // CHECK-SAME: %[[VAL_0:[0-9]+|[a-zA-Z$._-][a-zA-Z0-9$._-]*]]: !fir.box> {fir.bindc_name = "x"}) { // CHECK-NEXT: %[[VAL_1:.*]] = fir.dummy_scope : !fir.dscope // CHECK-NEXT: %[[VAL_2:.*]] = fir.declare %[[VAL_0]] dummy_scope %[[VAL_1]] {uniq_name = "_QFtestEx"} : (!fir.box>, !fir.dscope) -> !fir.box> // CHECK-NEXT: return // CHECK-NEXT: }