1! RUN: bbc -emit-fir -hlfir=false %s -o - | FileCheck %s 2 3! CHECK-LABEL: func @_QPpointer_forall_degenerated_assignment() { 4 5subroutine pointer_forall_degenerated_assignment() 6 integer, pointer :: p 7 integer, target :: t(1) 8 forall (i=1:1) 9 ! Test hits a TODO when uncommented. 10 ! p => t(i) 11 end forall 12end subroutine 13 14! CHECK-LABEL: func @_QPlogical_forall_degenerated_assignment() { 15! CHECK: %[[VAL_0:.*]] = fir.alloca i32 {adapt.valuebyref, bindc_name = "i"} 16! CHECK: %[[VAL_1:.*]] = fir.alloca !fir.logical<4> {bindc_name = "l", uniq_name = "_QFlogical_forall_degenerated_assignmentEl"} 17! CHECK: %[[VAL_2:.*]] = arith.constant 1 : i32 18! CHECK: %[[VAL_3:.*]] = fir.convert %[[VAL_2]] : (i32) -> index 19! CHECK: %[[VAL_4:.*]] = arith.constant 1 : i32 20! CHECK: %[[VAL_5:.*]] = fir.convert %[[VAL_4]] : (i32) -> index 21! CHECK: %[[VAL_6:.*]] = arith.constant 1 : index 22! CHECK: fir.do_loop %[[VAL_7:.*]] = %[[VAL_3]] to %[[VAL_5]] step %[[VAL_6]] unordered { 23! CHECK: %[[VAL_8:.*]] = fir.convert %[[VAL_7]] : (index) -> i32 24! CHECK: fir.store %[[VAL_8]] to %[[VAL_0]] : !fir.ref<i32> 25! CHECK: %[[VAL_9:.*]] = arith.constant true 26! CHECK: %[[VAL_10:.*]] = fir.convert %[[VAL_9]] : (i1) -> !fir.logical<4> 27! CHECK: fir.store %[[VAL_10]] to %[[VAL_1]] : !fir.ref<!fir.logical<4>> 28! CHECK: } 29! CHECK: return 30! CHECK: } 31 32subroutine logical_forall_degenerated_assignment() 33 logical :: l 34 forall (i=1:1) 35 l = .true. 36 end forall 37end subroutine 38 39