[flang-commits] [flang] [llvm] [flang] implement show_descriptor intrinsic, a non-standard extension (PR #169137)

via flang-commits flang-commits at lists.llvm.org
Fri Nov 21 17:19:59 PST 2025


github-actions[bot] wrote:

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

* 3818 tests passed
* 201 tests skipped
* 1 test failed

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

### Flang
<details>
<summary>Flang.Lower/Intrinsics/show_descriptor.f90</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
bbc -emit-fir /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/Intrinsics/show_descriptor.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/Intrinsics/show_descriptor.f90
# executed command: bbc -emit-fir /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/Intrinsics/show_descriptor.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/Intrinsics/show_descriptor.f90
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/Intrinsics/show_descriptor.f90:110:10: error: CHECK: expected string not found in input
# | ! CHECK: %[[EMBOX_3:.*]] = fir.embox %[[DECLARE_2]](%[[SHAPE_0]]) : (!fir.ref<!fir.array<2x!fir.logical<2>>>, !fir.shape<1>) -> !fir.box<!fir.ptr<!fir.array<?x!fir.logical<2>>>>
# |          ^
# | <stdin>:92:95: note: scanning from here
# |  fir.call @_FortranAShowDescriptor(%14) fastmath<contract> : (!fir.box<!fir.logical<2>>) -> ()
# |                                                                                               ^
# | <stdin>:92:95: note: with "DECLARE_2" equal to "7"
# |  fir.call @_FortranAShowDescriptor(%14) fastmath<contract> : (!fir.box<!fir.logical<2>>) -> ()
# |                                                                                               ^
# | <stdin>:92:95: note: with "SHAPE_0" equal to "6"
# |  fir.call @_FortranAShowDescriptor(%14) fastmath<contract> : (!fir.box<!fir.logical<2>>) -> ()
# |                                                                                               ^
# | <stdin>:94:2: note: possible intended match here
# |  %16 = fir.embox %15(%6) : (!fir.ref<!fir.array<?x!fir.logical<2>>>, !fir.shape<1>) -> !fir.box<!fir.ptr<!fir.array<?x!fir.logical<2>>>>
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/Intrinsics/show_descriptor.f90
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |              .
# |              .
# |              .
# |             87:  fir.store %11 to %8 : !fir.ref<!fir.box<!fir.ptr<!fir.array<?x!fir.logical<2>>>>> 
# |             88:  %12 = fir.declare %8 {fortran_attrs = #fir.var_attrs<pointer>, uniq_name = "_QFtest_logicalEpla2"} : (!fir.ref<!fir.box<!fir.ptr<!fir.array<?x!fir.logical<2>>>>>) -> !fir.ref<!fir.box<!fir.ptr<!fir.array<?x!fir.logical<2>>>>> 
# |             89:  %13 = fir.embox %2 : (!fir.ref<!fir.logical<1>>) -> !fir.box<!fir.logical<1>> 
# |             90:  fir.call @_FortranAShowDescriptor(%13) fastmath<contract> : (!fir.box<!fir.logical<1>>) -> () 
# |             91:  %14 = fir.embox %4 : (!fir.ref<!fir.logical<2>>) -> !fir.box<!fir.logical<2>> 
# |             92:  fir.call @_FortranAShowDescriptor(%14) fastmath<contract> : (!fir.box<!fir.logical<2>>) -> () 
# | check:110'0                                                                                                   X error: no match found
# | check:110'1                                                                                                     with "DECLARE_2" equal to "7"
# | check:110'2                                                                                                     with "SHAPE_0" equal to "6"
# |             93:  %15 = fir.convert %7 : (!fir.ref<!fir.array<2x!fir.logical<2>>>) -> !fir.ref<!fir.array<?x!fir.logical<2>>> 
# | check:110'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             94:  %16 = fir.embox %15(%6) : (!fir.ref<!fir.array<?x!fir.logical<2>>>, !fir.shape<1>) -> !fir.box<!fir.ptr<!fir.array<?x!fir.logical<2>>>> 
# | check:110'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:110'3      ?                                                                                                                                        possible intended match
# |             95:  fir.store %16 to %12 : !fir.ref<!fir.box<!fir.ptr<!fir.array<?x!fir.logical<2>>>>> 
# | check:110'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             96:  %17 = fir.embox %7(%6) : (!fir.ref<!fir.array<2x!fir.logical<2>>>, !fir.shape<1>) -> !fir.box<!fir.array<2x!fir.logical<2>>> 
# | check:110'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             97:  fir.call @_FortranAShowDescriptor(%17) fastmath<contract> : (!fir.box<!fir.array<2x!fir.logical<2>>>) -> () 
# | check:110'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             98:  %18 = fir.load %12 : !fir.ref<!fir.box<!fir.ptr<!fir.array<?x!fir.logical<2>>>>> 
# | check:110'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             99:  fir.call @_FortranAShowDescriptor(%18) fastmath<contract> : (!fir.box<!fir.ptr<!fir.array<?x!fir.logical<2>>>>) -> () 
# | check:110'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/169137


More information about the flang-commits mailing list