1 ! RUN: bbc -emit-fir %s -o - | FileCheck %s
3 ! CHECK-LABEL: func @_QPpointer_forall_degenerated_assignment() {
5 subroutine pointer_forall_degenerated_assignment()
7 integer, target
:: t(1)
9 ! Test hits a TODO when uncommented.
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>>
32 subroutine logical_forall_degenerated_assignment()