[flang-commits] [flang] [Flang][Semantics] Fix incorrect merging of separate module procedure interfaces during USE association (PR #197173)
via flang-commits
flang-commits at lists.llvm.org
Tue May 12 06:29:12 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
* 4259 tests passed
* 205 tests skipped
* 3 tests failed
## Failed Tests
(click on a test name to see its output)
### Flang
<details>
<summary>Flang.Lower/OpenACC/acc-host-data-cuda-host-assoc.f90</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
bbc -fopenacc -fcuda -emit-hlfir /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/OpenACC/acc-host-data-cuda-host-assoc.f90 -o - | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/OpenACC/acc-host-data-cuda-host-assoc.f90
# executed command: bbc -fopenacc -fcuda -emit-hlfir /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/OpenACC/acc-host-data-cuda-host-assoc.f90 -o -
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/OpenACC/acc-host-data-cuda-host-assoc.f90
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/OpenACC/acc-host-data-cuda-host-assoc.f90:24:10: error: CHECK: expected string not found in input
# | ! CHECK: fir.call @_QPproc_device
# | ^
# | <stdin>:1:1: note: scanning from here
# | module attributes {dlti.dl_spec = #dlti.dl_spec<!llvm.ptr<270> = dense<32> : vector<4xi64>, !llvm.ptr<271> = dense<32> : vector<4xi64>, !llvm.ptr<272> = dense<64> : vector<4xi64>, i64 = dense<64> : vector<2xi64>, i128 = dense<128> : vector<2xi64>, f80 = dense<128> : vector<2xi64>, !llvm.ptr = dense<64> : vector<4xi64>, i1 = dense<8> : vector<2xi64>, i8 = dense<8> : vector<2xi64>, i16 = dense<16> : vector<2xi64>, i32 = dense<32> : vector<2xi64>, f16 = dense<16> : vector<2xi64>, f64 = dense<64> : vector<2xi64>, f128 = dense<128> : vector<2xi64>, "dlti.endianness" = "little", "dlti.mangling_mode" = "e", "dlti.legal_int_widths" = array<i32: 8, 16, 32, 64>, "dlti.stack_alignment" = 128 : i64>, fir.defaultkind = "a1c4d8i4l4r4", fir.kindmap = "", fir.relocation_model = 1 : i32, llvm.data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", llvm.ident = "flang version 23.0.0 (https://github.com/llvm/llvm-project 8e00ceae474def2b29ae4f25ff98c652c644ac8e)", llvm.target_triple = "x86_64-unknown-linux-gnu"} {
# | ^
# | <stdin>:24:2: note: possible intended match here
# | fir.call @_QPproc_host(%5#0) fastmath<contract> : (!fir.ref<!fir.array<100xf32>>) -> ()
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/OpenACC/acc-host-data-cuda-host-assoc.f90
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: module attributes {dlti.dl_spec = #dlti.dl_spec<!llvm.ptr<270> = dense<32> : vector<4xi64>, !llvm.ptr<271> = dense<32> : vector<4xi64>, !llvm.ptr<272> = dense<64> : vector<4xi64>, i64 = dense<64> : vector<2xi64>, i128 = dense<128> : vector<2xi64>, f80 = dense<128> : vector<2xi64>, !llvm.ptr = dense<64> : vector<4xi64>, i1 = dense<8> : vector<2xi64>, i8 = dense<8> : vector<2xi64>, i16 = dense<16> : vector<2xi64>, i32 = dense<32> : vector<2xi64>, f16 = dense<16> : vector<2xi64>, f64 = dense<64> : vector<2xi64>, f128 = dense<128> : vector<2xi64>, "dlti.endianness" = "little", "dlti.mangling_mode" = "e", "dlti.legal_int_widths" = array<i32: 8, 16, 32, 64>, "dlti.stack_alignment" = 128 : i64>, fir.defaultkind = "a1c4d8i4l4r4", fir.kindmap = "", fir.relocation_model = 1 : i32, llvm.data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", llvm.ident = "flang version 23.0.0 (https://github.com/llvm/llvm-project 8e00ceae474def2b29ae4f25ff98c652c644ac8e)", llvm.target_triple = "x86_64-unknown-linux-gnu"} {
# | check:24'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# | 2: func.func @_QQmain() {
# | check:24'0 ~~~~~~~~~~~~~~~~~~~~~~~~
# | 3: %0 = fir.dummy_scope : !fir.dscope
# | check:24'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 4: %1 = fir.address_of(@_QFEa) : !fir.ref<!fir.array<100xf32>>
# | check:24'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 5: %c100 = arith.constant 100 : index
# | check:24'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 6: %2 = fir.shape %c100 : (index) -> !fir.shape<1>
# | check:24'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | 19: %2 = fir.shape %c100 : (index) -> !fir.shape<1>
# | check:24'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 20: %3:2 = hlfir.declare %1(%2) {uniq_name = "_QFEa"} : (!fir.ref<!fir.array<100xf32>>, !fir.shape<1>) -> (!fir.ref<!fir.array<100xf32>>, !fir.ref<!fir.array<100xf32>>)
# | check:24'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 21: %4 = acc.use_device varPtr(%3#0 : !fir.ref<!fir.array<100xf32>>) -> !fir.ref<!fir.array<100xf32>> {name = "a"}
# | check:24'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 22: acc.host_data dataOperands(%4 : !fir.ref<!fir.array<100xf32>>) {
# | check:24'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 23: %5:2 = hlfir.declare %4(%2) {uniq_name = "_QFEa"} : (!fir.ref<!fir.array<100xf32>>, !fir.shape<1>) -> (!fir.ref<!fir.array<100xf32>>, !fir.ref<!fir.array<100xf32>>)
# | check:24'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 24: fir.call @_QPproc_host(%5#0) fastmath<contract> : (!fir.ref<!fir.array<100xf32>>) -> ()
# | check:24'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:24'1 ? possible intended match
# | 25: acc.terminator
# | check:24'0 ~~~~~~~~~~~~~~~~
# | 26: }
# | check:24'0 ~~~
# | 27: return
# | check:24'0 ~~~~~~~~
# | 28: }
# | check:24'0 ~~~
# | 29: fir.global internal @_QFEa : !fir.array<100xf32> {
# | check:24'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>Flang.Lower/host_module_variable_instantiation_use_device.f90</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/flang -fc1 -emit-hlfir -fopenacc /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/host_module_variable_instantiation_use_device.f90 -o - | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/host_module_variable_instantiation_use_device.f90
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/flang -fc1 -emit-hlfir -fopenacc /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/host_module_variable_instantiation_use_device.f90 -o -
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/host_module_variable_instantiation_use_device.f90
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/host_module_variable_instantiation_use_device.f90:57:14: error: CHECK-NOT: excluded string found in input
# | ! CHECK-NOT: fir.address_of(@_QMtest_use_deviceEa)
# | ^
# | <stdin>:45:7: note: found here
# | %1 = fir.address_of(@_QMtest_use_deviceEa) : !fir.ref<!fir.array<100xf32>>
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/host_module_variable_instantiation_use_device.f90
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 40: }
# | 41: return
# | 42: }
# | 43: func.func @_QMtest_use_devicePtest_shadowed() {
# | 44: %0 = fir.dummy_scope : !fir.dscope
# | 45: %1 = fir.address_of(@_QMtest_use_deviceEa) : !fir.ref<!fir.array<100xf32>>
# | not:57 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match expected
# | 46: %c100 = arith.constant 100 : index
# | 47: %2 = fir.shape %c100 : (index) -> !fir.shape<1>
# | 48: %3:2 = hlfir.declare %1(%2) {uniq_name = "_QMtest_use_deviceEa"} : (!fir.ref<!fir.array<100xf32>>, !fir.shape<1>) -> (!fir.ref<!fir.array<100xf32>>, !fir.ref<!fir.array<100xf32>>)
# | 49: %c100_0 = arith.constant 100 : index
# | 50: %4 = fir.alloca !fir.array<100xf32> {bindc_name = "a", uniq_name = "_QMtest_use_deviceFtest_shadowedEa"}
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>Flang.Semantics/cuf27.cuf</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
"/usr/bin/python3" /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Semantics/test_errors.py /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Semantics/cuf27.cuf /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/flang -fc1 -fopenacc
# executed command: /usr/bin/python3 /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Semantics/test_errors.py /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Semantics/cuf27.cuf /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/flang -fc1 -fopenacc
# .---command stdout------------
# | ---
# | +++
# | @@ -1 +0,0 @@
# |
# | actual at 37: No specific subroutine of generic 'overl' matches the actual arguments
# |
# | FAIL
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.
https://github.com/llvm/llvm-project/pull/197173
More information about the flang-commits
mailing list