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
82 lines
2.2 KiB
Fortran
82 lines
2.2 KiB
Fortran
! REQUIRES: flang-supports-f128-math
|
|
! RUN: bbc %s -o - | tco | FileCheck %s
|
|
! RUN: %flang -emit-llvm -S -mmlir -disable-external-name-interop %s -o - | FileCheck %s
|
|
|
|
! CHECK: @__BLNK__ = common global [8 x i8] zeroinitializer
|
|
! CHECK: @co1_ = common global [16 x i8] zeroinitializer, align 16
|
|
! CHECK: @rien_ = common global [1 x i8] zeroinitializer
|
|
! CHECK: @with_empty_equiv_ = common global [8 x i8] zeroinitializer
|
|
! CHECK: @x_ = {{(dso_local )?}}global { float, float } { float 1.0{{.*}}, float 2.0{{.*}} }
|
|
! CHECK: @y_ = common global [12 x i8] zeroinitializer
|
|
! CHECK: @z_ = {{(dso_local )?}}global { i32, [4 x i8], float } { i32 42, [4 x i8] zeroinitializer, float 3.000000e+00 }
|
|
|
|
! CHECK-LABEL: _QPs0
|
|
subroutine s0
|
|
common // a0, b0
|
|
|
|
! CHECK: call void @_QPs(ptr @__BLNK__, ptr getelementptr inbounds nuw (i8, ptr @__BLNK__, i64 4))
|
|
call s(a0, b0)
|
|
end subroutine s0
|
|
|
|
! CHECK-LABEL: _QPs1
|
|
subroutine s1
|
|
common /x/ a1, b1
|
|
data a1 /1.0/, b1 /2.0/
|
|
|
|
! CHECK: call void @_QPs(ptr @x_, ptr getelementptr inbounds nuw (i8, ptr @x_, i64 4))
|
|
call s(a1, b1)
|
|
end subroutine s1
|
|
|
|
! CHECK-LABEL: _QPs2
|
|
subroutine s2
|
|
common /y/ a2, b2, c2
|
|
|
|
! CHECK: call void @_QPs(ptr @y_, ptr getelementptr inbounds nuw (i8, ptr @y_, i64 4))
|
|
call s(a2, b2)
|
|
end subroutine s2
|
|
|
|
! Test that common initialized through aliases of common members are getting
|
|
! the correct initializer.
|
|
! CHECK-LABEL: _QPs3
|
|
subroutine s3
|
|
integer :: i = 42
|
|
real :: x
|
|
complex :: c
|
|
real :: glue(2)
|
|
real :: y = 3.
|
|
equivalence (i, x), (glue(1), c), (glue(2), y)
|
|
! x and c are not directly initialized, but overlapping aliases are.
|
|
common /z/ x, c
|
|
end subroutine s3
|
|
|
|
module mod_with_common
|
|
integer :: i, j
|
|
common /c_in_mod/ i, j
|
|
end module
|
|
! CHECK-LABEL: _QPs4
|
|
subroutine s4
|
|
use mod_with_common
|
|
! CHECK: load i32, ptr @c_in_mod_
|
|
print *, i
|
|
! CHECK: load i32, ptr getelementptr inbounds nuw (i8, ptr @c_in_mod_, i64 4)
|
|
print *, j
|
|
end subroutine s4
|
|
|
|
! CHECK-LABEL: _QPs5
|
|
subroutine s5
|
|
real r(1:0)
|
|
common /rien/ r
|
|
end subroutine s5
|
|
|
|
! CHECK-LABEL: _QPs6
|
|
subroutine s6
|
|
real r1(1:0), r2(1:0), x, y
|
|
common /with_empty_equiv/ x, r1, y
|
|
equivalence(r1, r2)
|
|
end subroutine s6
|
|
|
|
subroutine s7()
|
|
real(16) r16
|
|
common /co1/ r16
|
|
end subroutine
|