Files
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

70 lines
2.7 KiB
Fortran

! RUN: bbc -emit-fir %s -o - | FileCheck %s
! Test lowering of module that defines data that is otherwise not used
! in this file.
! Module defines variable in common block without initializer
module modCommonNoInit1
! Module variable is in blank common
real :: x_blank
common // x_blank
! Module variable is in named common, no init
real :: x_named1
common /named1/ x_named1
end module
! CHECK-LABEL: fir.global common @__BLNK__(dense<0> : vector<4xi8>) {alignment = 4 : i64} : !fir.array<4xi8>
! CHECK-LABEL: fir.global common @named1_(dense<0> : vector<4xi8>) {alignment = 4 : i64} : !fir.array<4xi8>
! Module defines variable in common block with initialization
module modCommonInit1
integer :: i_named2 = 42
common /named2/ i_named2
end module
! CHECK-LABEL: fir.global @named2_ {alignment = 4 : i64} : tuple<i32> {
! CHECK: %[[init:.*]] = fir.insert_value %{{.*}}, %c42{{.*}}, [0 : index] : (tuple<i32>, i32) -> tuple<i32>
! CHECK: fir.has_value %[[init]] : tuple<i32>
! Module m1 defines simple data
module m1
real :: x
integer :: y(100)
end module
! CHECK: fir.global @_QMm1Ex : f32
! CHECK: fir.global @_QMm1Ey {alignment = 64 : i64} : !fir.array<100xi32>
! Module modEq1 defines data that is equivalenced and not used in this
! file.
module modEq1
! Equivalence, no initialization
real :: x1(10), x2(10), x3(10)
! Equivalence with initialization
real :: y1 = 42.
real :: y2(10)
equivalence (x1(1), x2(5), x3(10)), (y1, y2(5))
end module
! CHECK-LABEL: fir.global @_QMmodeq1Ex1 {alignment = 64 : i64} : !fir.array<76xi8>
! CHECK-LABEL: fir.global @_QMmodeq1Ey1 {alignment = 64 : i64} : !fir.array<10xi32> {
! CHECK: %[[undef:.*]] = fir.undefined !fir.array<10xi32>
! CHECK: %[[v1:.*]] = fir.insert_on_range %0, %c0{{.*}} from (0) to (3) : (!fir.array<10xi32>, i32) -> !fir.array<10xi32>
! CHECK: %[[v2:.*]] = fir.insert_value %1, %c1109917696{{.*}}, [4 : index] : (!fir.array<10xi32>, i32) -> !fir.array<10xi32>
! CHECK: %[[v3:.*]] = fir.insert_on_range %2, %c0{{.*}} from (5) to (9) : (!fir.array<10xi32>, i32) -> !fir.array<10xi32>
! CHECK: fir.has_value %[[v3]] : !fir.array<10xi32>
! Test defining two module variables whose initializers depend on each others
! addresses.
module global_init_depending_on_each_other_address
type a
type(b), pointer :: pb
end type
type b
type(a), pointer :: pa
end type
type(a), target :: xa
type(b), target :: xb
data xa, xb/a(xb), b(xa)/
end module
! CHECK-LABEL: fir.global @_QMglobal_init_depending_on_each_other_addressExb
! CHECK: fir.address_of(@_QMglobal_init_depending_on_each_other_addressExa)
! CHECK-LABEL: fir.global @_QMglobal_init_depending_on_each_other_addressExa
! CHECK: fir.address_of(@_QMglobal_init_depending_on_each_other_addressExb)