[flang-commits] [flang] [flang][pft] visit original symbol in acc use_device (PR #194588)

via flang-commits flang-commits at lists.llvm.org
Tue Apr 28 03:55:09 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results

* 4220 tests passed
* 203 tests skipped
* 1 test failed

## Failed Tests
(click on a test name to see its output)

### Flang
<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 /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 /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:32:10: error: CHECK: expected string not found in input
# | ! CHECK: %[[USE_DEVICE_0:.*]] = acc.use_device varPtr(%[[DECLARE_0]]#0 : !fir.ref<!fir.array<100xf32>>) -> !fir.ref<!fir.array<100xf32>> {name = "a"}
# |          ^
# | <stdin>:7:181: note: scanning from here
# |  %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>>)
# |                                                                                                                                                                                     ^
# | <stdin>:7:181: note: with "DECLARE_0" equal to "3"
# |  %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>>)
# |                                                                                                                                                                                     ^
# | <stdin>:8:2: note: possible intended match here
# |  %4 = fir.convert %3#0 : (!fir.ref<!fir.array<100xf32>>) -> !fir.ref<!fir.array<?xf32>>
# |  ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/host_module_variable_instantiation_use_device.f90:42:10: error: CHECK: expected string not found in input
# | ! CHECK: %[[ADDRESS_OF_0:.*]] = fir.address_of(@_QMtest_use_deviceEa) : !fir.ref<!fir.array<100xf32>>
# |          ^
# | <stdin>:12:51: note: scanning from here
# |  func.func @_QMtest_use_devicePtest_designator() {
# |                                                   ^
# | <stdin>:16:2: note: possible intended match here
# |  fir.global @_QMtest_use_deviceEa : !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:
# | <<<<<<
# |             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 0c7722a98cf03d6d776186c6f70906dcbde14573)", llvm.target_triple = "x86_64-unknown-linux-gnu"} { 
# |             2:  func.func @_QMtest_use_devicePtest_simple() { 
# |             3:  %0 = fir.dummy_scope : !fir.dscope 
# |             4:  %1 = fir.address_of(@_QMtest_use_deviceEa) : !fir.ref<!fir.array<100xf32>> 
# |             5:  %c100 = arith.constant 100 : index 
# |             6:  %2 = fir.shape %c100 : (index) -> !fir.shape<1> 
# |             7:  %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>>) 
# | check:32'0                                                                                                                                                                                         X error: no match found
# | check:32'1                                                                                                                                                                                           with "DECLARE_0" equal to "3"
# |             8:  %4 = fir.convert %3#0 : (!fir.ref<!fir.array<100xf32>>) -> !fir.ref<!fir.array<?xf32>> 
# | check:32'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:32'2      ?                                                                                       possible intended match
# |             9:  fir.call @_QPsomething(%4) fastmath<contract> : (!fir.ref<!fir.array<?xf32>>) -> () 
# | check:32'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            10:  return 
# | check:32'0     ~~~~~~~~
# |            11:  } 
# | check:32'0     ~~~
# |            12:  func.func @_QMtest_use_devicePtest_designator() { 
# | check:32'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:42'0                                                       X error: no match found
# |            13:  %0 = fir.dummy_scope : !fir.dscope 
# | check:42'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            14:  return 
# | check:42'0     ~~~~~~~~
# |            15:  } 
# | check:42'0     ~~~
# |            16:  fir.global @_QMtest_use_deviceEa : !fir.array<100xf32> { 
# | check:42'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:42'1      ?                                                         possible intended match
# |            17:  %0 = fir.zero_bits !fir.array<100xf32> 
# | check:42'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            18:  fir.has_value %0 : !fir.array<100xf32> 
# | check:42'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            19:  } 
# | check:42'0     ~~~
# |            20:  fir.global @_QMtest_use_deviceEi : i32 { 
# | check:42'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            21:  %0 = fir.zero_bits i32 
# | check:42'0     ~~~~~~~~~~~~~~~~~~~~~~~~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# 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/194588


More information about the flang-commits mailing list