! RUN: bbc -emit-fir -hlfir=false -o - %s | FileCheck %s ! Test that allocatable or pointer item from namelist are retrieved correctly ! if they are part of a common block as well. program nml_common integer :: i real, pointer :: p(:) namelist /t/i,p common /c/i,p allocate(p(2)) call print_t() contains subroutine print_t() write(*,t) end subroutine end ! CHECK-LABEL: fir.global linkonce @_QFNt.list constant : !fir.array<2xtuple, !fir.ref>>> { ! CHECK: %[[CB_ADDR:.*]] = fir.address_of(@c_) : !fir.ref> ! CHECK: %[[CB_CAST:.*]] = fir.convert %[[CB_ADDR]] : (!fir.ref>) -> !fir.ref> ! CHECK: %[[OFFSET:.*]] = arith.constant 8 : index ! CHECK: %[[COORD:.*]] = fir.coordinate_of %[[CB_CAST]], %[[OFFSET]] : (!fir.ref>, index) -> !fir.ref ! CHECK: %[[CAST_BOX:.*]] = fir.convert %[[COORD]] : (!fir.ref) -> !fir.ref>>> ! CHECK: %[[CAST_BOX_NONE:.*]] = fir.convert %[[CAST_BOX]] : (!fir.ref>>>) -> !fir.ref> ! CHECK: %[[RES:.*]] = fir.insert_value %{{.*}}, %[[CAST_BOX_NONE]], [1 : index, 1 : index] : (!fir.array<2xtuple, !fir.ref>>>, !fir.ref>) -> !fir.array<2xtuple, !fir.ref>>> ! CHECK: fir.has_value %[[RES]] : !fir.array<2xtuple, !fir.ref>>>