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
102 lines
3.1 KiB
Fortran
102 lines
3.1 KiB
Fortran
! Test the names created for globals holding constant literal values
|
|
! RUN: %flang_fc1 -emit-hlfir -o - %s | FileCheck %s
|
|
|
|
type someType
|
|
integer :: i
|
|
end type
|
|
|
|
type otherType
|
|
integer :: i
|
|
end type
|
|
|
|
type emptyType1
|
|
end type emptyType1
|
|
|
|
type emptyType2
|
|
end type emptyType2
|
|
|
|
print *, [42, 42]
|
|
! CHECK: fir.address_of(@_QQro.2xi4.0)
|
|
|
|
print *, reshape([42, 42, 42, 42, 42, 42], [2,3])
|
|
! CHECK: fir.address_of(@_QQro.2x3xi4.1)
|
|
|
|
print *, [42_8, 42_8]
|
|
! CHECK: fir.address_of(@_QQro.2xi8.2)
|
|
|
|
print *, [0.42, 0.42]
|
|
! CHECK: fir.address_of(@_QQro.2xr4.3)
|
|
|
|
print *, [0.42_8, 0.42_8]
|
|
! CHECK: fir.address_of(@_QQro.2xr8.4)
|
|
|
|
print *, [.true.]
|
|
! CHECK: fir.address_of(@_QQro.1xl4.5)
|
|
|
|
print *, [.true._8]
|
|
! CHECK: fir.address_of(@_QQro.1xl8.6)
|
|
|
|
print *, [(1., -1.), (-1., 1)]
|
|
! CHECK: fir.address_of(@_QQro.2xz4.7)
|
|
|
|
print *, [(1._8, -1._8), (-1._8, 1._8)]
|
|
! CHECK: fir.address_of(@_QQro.2xz8.8)
|
|
|
|
print *, [someType(42), someType(43)]
|
|
! CHECK: fir.address_of(@_QQro.2x_QFTsometype.9
|
|
|
|
! Verify that literals of the same type/shape
|
|
! are mapped to different global objects:
|
|
print *, [someType(11)]
|
|
! CHECK: fir.address_of(@_QQro.1x_QFTsometype.10)
|
|
print *, [someType(42)]
|
|
! CHECK: fir.address_of(@_QQro.1x_QFTsometype.11)
|
|
print *, [someType(11)]
|
|
! CHECK: fir.address_of(@_QQro.1x_QFTsometype.10)
|
|
print *, [someType(42)]
|
|
! CHECK: fir.address_of(@_QQro.1x_QFTsometype.11)
|
|
print *, [someType(11)]
|
|
! CHECK: fir.address_of(@_QQro.1x_QFTsometype.10)
|
|
print *, [someType(42)]
|
|
! CHECK: fir.address_of(@_QQro.1x_QFTsometype.11)
|
|
print *, [someType(11)]
|
|
! CHECK: fir.address_of(@_QQro.1x_QFTsometype.10)
|
|
print *, [someType(42)]
|
|
! CHECK: fir.address_of(@_QQro.1x_QFTsometype.11)
|
|
|
|
print *, [Character(4)::]
|
|
! CHECK: fir.address_of(@_QQro.0x4xc1.null.12)
|
|
print *, [Character(2)::]
|
|
! CHECK: fir.address_of(@_QQro.0x2xc1.null.13)
|
|
print *, [Character(2)::]
|
|
! CHECK: fir.address_of(@_QQro.0x2xc1.null.13)
|
|
|
|
print *, [otherType(42)]
|
|
! CHECK: fir.address_of(@_QQro.1x_QFTothertype.14)
|
|
|
|
print *, [emptyType1()]
|
|
print *, [emptyType2()]
|
|
end
|
|
|
|
! CHECK: fir.global internal @_QQro.1x_QFTsometype.10 {alignment = 64 : i64} constant : !fir.array<1x!fir.type<_QFTsometype{i:i32}>> {
|
|
! CHECK: %{{.*}} = arith.constant 11 : i32
|
|
! CHECK: }
|
|
|
|
! CHECK: fir.global internal @_QQro.1x_QFTsometype.11 {alignment = 64 : i64} constant : !fir.array<1x!fir.type<_QFTsometype{i:i32}>> {
|
|
! CHECK: %{{.*}} = arith.constant 42 : i32
|
|
! CHECK: }
|
|
|
|
! CHECK: fir.global internal @_QQro.0x4xc1.null.12 {alignment = 64 : i64} constant : !fir.array<0x!fir.char<1,4>> {
|
|
! CHECK: %[[T1:.*]] = fir.undefined !fir.array<0x!fir.char<1,4>>
|
|
! CHECK: fir.has_value %[[T1]] : !fir.array<0x!fir.char<1,4>>
|
|
! CHECK: }
|
|
|
|
! CHECK: fir.global internal @_QQro.0x2xc1.null.13 {alignment = 64 : i64} constant : !fir.array<0x!fir.char<1,2>> {
|
|
! CHECK: %[[T2:.*]] = fir.undefined !fir.array<0x!fir.char<1,2>>
|
|
! CHECK: fir.has_value %[[T2]] : !fir.array<0x!fir.char<1,2>>
|
|
! CHECK: }
|
|
|
|
! CHECK: fir.global internal @_QQro.1x_QFTothertype.14 {alignment = 64 : i64} constant : !fir.array<1x!fir.type<_QFTothertype{i:i32}>> {
|
|
! CHECK: %{{.*}} = arith.constant 42 : i32
|
|
! CHECK: }
|