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
48 lines
1.7 KiB
Fortran
48 lines
1.7 KiB
Fortran
! Test the mixing BIND(C) and non BIND(C) common blocks.
|
|
|
|
! RUN: %flang_fc1 -emit-llvm %s -o - 2>&1 | FileCheck %s --check-prefix=UNDERSCORING
|
|
! RUN: %flang_fc1 -emit-llvm -fno-underscoring %s -o - 2>&1 | FileCheck %s --check-prefix=NO-UNDERSCORING
|
|
|
|
! Scenario 1: Fortran symbols collide, but not the object file names, emit different
|
|
! globals for each common
|
|
subroutine bindc_common_with_same_fortran_name()
|
|
real :: x
|
|
common /com1/ x
|
|
bind(c, name="not_com1") :: /com1/
|
|
print *, x
|
|
end subroutine
|
|
|
|
subroutine bindc_common_with_same_fortran_name_2()
|
|
real :: x(2), y(2)
|
|
common /com1/ x
|
|
print *, x
|
|
end subroutine
|
|
|
|
! Scenario 2: object file names of common block may collide (depending on
|
|
! underscoring option). Merge common block into a single global symbol.
|
|
subroutine bindc_common_colliding_with_normal_common()
|
|
real :: x, y
|
|
common /com3/ x
|
|
common /com4/ y
|
|
bind(c, name="some_common_") :: /com3/
|
|
bind(c, name="__BLNK__") :: /com4/
|
|
print *, x, y
|
|
end subroutine
|
|
subroutine bindc_common_colliding_with_normal_common_2()
|
|
real :: x(2), y(2)
|
|
common /some_common/ x
|
|
common // y
|
|
print *, x, y
|
|
end subroutine
|
|
|
|
! UNDERSCORING: @__BLNK__ = common global [8 x i8] zeroinitializer
|
|
! UNDERSCORING: @com1_ = common global [8 x i8] zeroinitializer
|
|
! UNDERSCORING: @not_com1 = common global [4 x i8] zeroinitializer
|
|
! UNDERSCORING: @some_common_ = common global [8 x i8] zeroinitializer
|
|
|
|
! NO-UNDERSCORING: @__BLNK__ = common global [8 x i8] zeroinitializer
|
|
! NO-UNDERSCORING: @com1 = common global [8 x i8] zeroinitializer
|
|
! NO-UNDERSCORING: @not_com1 = common global [4 x i8] zeroinitializer
|
|
! NO-UNDERSCORING: @some_common = common global [8 x i8] zeroinitializer
|
|
! NO-UNDERSCORING: @some_common_ = common global [4 x i8] zeroinitializer
|