CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
46 lines
2.0 KiB
Fortran
46 lines
2.0 KiB
Fortran
! RUN: bbc -emit-hlfir %s -o - | FileCheck %s
|
|
|
|
! Simple character assignment tests
|
|
subroutine assign1(lhs, rhs)
|
|
character(*, 1) :: lhs, rhs
|
|
lhs = rhs
|
|
end subroutine
|
|
! CHECK-LABEL: func.func @_QPassign1(
|
|
! CHECK: %[[VAL_4:.*]]:2 = hlfir.declare{{.*}}"_QFassign1Elhs"
|
|
! CHECK: %[[VAL_6:.*]]:2 = hlfir.declare{{.*}}"_QFassign1Erhs"
|
|
! CHECK: hlfir.assign %[[VAL_6]]#0 to %[[VAL_4]]#0 : !fir.boxchar<1>, !fir.boxchar<1>
|
|
! CHECK: return
|
|
! CHECK: }
|
|
|
|
! Test substring assignment
|
|
subroutine assign_substring1(str, rhs, lb, ub)
|
|
character(*, 1) :: rhs, str
|
|
integer(8) :: lb, ub
|
|
str(lb:ub) = rhs
|
|
end subroutine
|
|
! CHECK-LABEL: func.func @_QPassign_substring1(
|
|
! CHECK: %[[VAL_7:.*]]:2 = hlfir.declare{{.*}}"_QFassign_substring1Erhs"
|
|
! CHECK: %[[VAL_9:.*]]:2 = hlfir.declare{{.*}}"_QFassign_substring1Estr"
|
|
! CHECK: %[[VAL_21:.*]] = hlfir.designate %[[VAL_9]]#0 substr {{.*}}
|
|
! CHECK: hlfir.assign %[[VAL_7]]#0 to %[[VAL_21]] : !fir.boxchar<1>, !fir.boxchar<1>
|
|
! CHECK: return
|
|
! CHECK: }
|
|
|
|
subroutine assign_constant(lhs)
|
|
character(*, 1) :: lhs
|
|
lhs = "Hello World"
|
|
end subroutine
|
|
! CHECK-LABEL: func.func @_QPassign_constant(
|
|
! CHECK: %[[VAL_3:.*]]:2 = hlfir.declare{{.*}}"_QFassign_constantElhs"
|
|
! CHECK: %[[VAL_6:.*]]:2 = hlfir.declare{{.*}}"_QQclX48656C6C6F20576F726C64"
|
|
! CHECK: hlfir.assign %[[VAL_6]]#0 to %[[VAL_3]]#0 : !fir.ref<!fir.char<1,11>>, !fir.boxchar<1>
|
|
|
|
subroutine assign_zero_size_array(n)
|
|
character(n), allocatable :: a(:)
|
|
a = [character(n)::]
|
|
end subroutine
|
|
! CHECK-LABEL: func.func @_QPassign_zero_size_array(
|
|
! CHECK: %[[VAL_12:.*]]:2 = hlfir.declare{{.*}}"_QFassign_zero_size_arrayEa"
|
|
! CHECK: %[[VAL_24:.*]] = hlfir.as_expr %{{.*}}
|
|
! CHECK: hlfir.assign %[[VAL_24]] to %[[VAL_12]]#0 realloc keep_lhs_len : !hlfir.expr<0x!fir.char<1,?>>, !fir.ref<!fir.box<!fir.heap<!fir.array<?x!fir.char<1,?>>>>>
|