[flang-commits] [flang] [flang][OpenMP] declare variant (PR #204345)

via flang-commits flang-commits at lists.llvm.org
Wed Jun 17 05:36:18 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results

* 4351 tests passed
* 250 tests skipped
* 2 tests failed

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

### Flang
<details>
<summary>Flang.Lower/OpenMP/Todo/dispatch.f90</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
c:\_work\llvm-project\llvm-project\build\bin\not.exe c:\_work\llvm-project\llvm-project\build\bin\flang.exe -fc1 -fintrinsic-modules-path=C:\_work\llvm-project\llvm-project\build\lib\clang\23\finclude\flang\x86_64-pc-windows-msvc -emit-fir -fopenmp -fopenmp-version=51 -o - C:\_work\llvm-project\llvm-project\flang\test\Lower\OpenMP\Todo\dispatch.f90 2>&1 | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\flang\test\Lower\OpenMP\Todo\dispatch.f90
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\not.exe' 'c:\_work\llvm-project\llvm-project\build\bin\flang.exe' -fc1 '-fintrinsic-modules-path=C:\_work\llvm-project\llvm-project\build\lib\clang\23\finclude\flang\x86_64-pc-windows-msvc' -emit-fir -fopenmp -fopenmp-version=51 -o - 'C:\_work\llvm-project\llvm-project\flang\test\Lower\OpenMP\Todo\dispatch.f90'
# note: command had no output on stdout or stderr
# error: command failed with exit status: 1
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\flang\test\Lower\OpenMP\Todo\dispatch.f90'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\flang\test\Lower\OpenMP\Todo\dispatch.f90:3:10: error: CHECK: expected string not found in input
# | ! CHECK: not yet implemented: OpenMPDispatchConstruct
# |          ^
# | <stdin>:1:1: note: scanning from here
# | warning: OpenMP support for version 51 in flang is still incomplete [-Wexperimental-option]
# | ^
# | <stdin>:1:54: note: possible intended match here
# | warning: OpenMP support for version 51 in flang is still incomplete [-Wexperimental-option]
# |                                                      ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\flang\test\Lower\OpenMP\Todo\dispatch.f90
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |            1: warning: OpenMP support for version 51 in flang is still incomplete [-Wexperimental-option] 
# | check:3'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# | check:3'1                                                          ?                                       possible intended match
# |            2: 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" = "w", "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:w-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 c71752a96306d90a5eecb5de8c288f92f54fc297)", llvm.target_triple = "x86_64-pc-windows-msvc", omp.is_gpu = false, omp.is_target_device = false, omp.target_triples = [], omp.version = #omp.version<version = 51>} { 
# | check:3'0     ~~~~~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~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            3:  func.func @_QQmain() attributes {fir.bindc_name = "P"} { 
# | check:3'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            4:  %c1_i32 = arith.constant 1 : i32 
# | check:3'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            5:  %0 = fir.dummy_scope : !fir.dscope 
# | check:3'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            6:  %1 = fir.alloca i32 {bindc_name = "r", uniq_name = "_QFEr"} 
# | check:3'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            .
# |            .
# |            .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>Flang.Lower/OpenMP/metadirective-user.f90</summary>

```
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 3
c:\_work\llvm-project\llvm-project\build\bin\flang.exe -fc1 -fintrinsic-modules-path=C:\_work\llvm-project\llvm-project\build\lib\clang\23\finclude\flang\x86_64-pc-windows-msvc -fopenmp -emit-hlfir -fopenmp-version=50 C:\_work\llvm-project\llvm-project\flang\test\Lower\OpenMP\metadirective-user.f90 -o - | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\flang\test\Lower\OpenMP\metadirective-user.f90
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\flang.exe' -fc1 '-fintrinsic-modules-path=C:\_work\llvm-project\llvm-project\build\lib\clang\23\finclude\flang\x86_64-pc-windows-msvc' -fopenmp -emit-hlfir -fopenmp-version=50 'C:\_work\llvm-project\llvm-project\flang\test\Lower\OpenMP\metadirective-user.f90' -o -
# .---command stderr------------
# | warning: OpenMP support for version 50 in flang is still incomplete [-Wexperimental-option]
# | error: loc("C:\\_work\\llvm-project\\llvm-project\\flang\\test\\Lower\\OpenMP\\metadirective-user.f90":110:32): block with no terminator, has 
# | "fir.if"(%3) ({
# |   "omp.barrier"() : () -> ()
# |   "fir.result"() : () -> ()
# | }, {
# |   "fir.result"() : () -> ()
# | }) : (i1) -> ()
# | error: loc("C:\\_work\\llvm-project\\llvm-project\\flang\\test\\Lower\\OpenMP\\metadirective-user.f90":132:32): block with no terminator, has 
# | "fir.if"(%4) ({
# |   "omp.barrier"() : () -> ()
# |   "fir.result"() : () -> ()
# | }, {
# |   "fir.result"() : () -> ()
# | }) : (i1) -> ()
# | error: loc("C:\\_work\\llvm-project\\llvm-project\\flang\\test\\Lower\\OpenMP\\metadirective-user.f90":187:32): block with no terminator, has 
# | "fir.if"(%9) ({
# |   "omp.barrier"() : () -> ()
# |   "fir.result"() : () -> ()
# | }, {
# |   "omp.taskwait"() <{operandSegmentSizes = array<i32: 0, 0>}> : () -> ()
# |   "fir.result"() : () -> ()
# | }) : (i1) -> ()
# | error: loc("C:\\_work\\llvm-project\\llvm-project\\flang\\test\\Lower\\OpenMP\\metadirective-user.f90":213:63): block with no terminator, has 
# | "fir.if"(%4) ({
# |   "omp.barrier"() : () -> ()
# |   "fir.result"() : () -> ()
# | }, {
# |   "omp.taskwait"() <{operandSegmentSizes = array<i32: 0, 0>}> : () -> ()
# |   "fir.result"() : () -> ()
# | }) : (i1) -> ()
# | error: loc("C:\\_work\\llvm-project\\llvm-project\\flang\\test\\Lower\\OpenMP\\metadirective-user.f90":239:63): block with no terminator, has 
# | "fir.if"(%3) ({
# |   "omp.barrier"() : () -> ()
# |   "fir.result"() : () -> ()
# | }, {
# |   "omp.taskwait"() <{operandSegmentSizes = array<i32: 0, 0>}> : () -> ()
# |   "fir.result"() : () -> ()
# | }) : (i1) -> ()
# | error: loc("C:\\_work\\llvm-project\\llvm-project\\flang\\test\\Lower\\OpenMP\\metadirective-user.f90":330:45): block with no terminator, has 
# | "fir.if"(%4) ({
# |   "omp.barrier"() : () -> ()
# |   "fir.result"() : () -> ()
# | }, {
# |   %5 = "fir.load"(%2#0) : (!fir.ref<!fir.logical<4>>) -> !fir.logical<4>
# |   %6 = "fir.convert"(%5) : (!fir.logical<4>) -> i1
# |   "fir.if"(%6) ({
# |     "omp.taskyield"() : () -> ()
# |     "fir.result"() : () -> ()
# |   }, {
# |     "omp.taskwait"() <{operandSegmentSizes = array<i32: 0, 0>}> : () -> ()
# |     "fir.result"() : () -> ()
# |   }) : (i1) -> ()
# |   "fir.result"() : () -> ()
# | }) : (i1) -> ()
# | error: loc("C:\\_work\\llvm-project\\llvm-project\\flang\\test\\Lower\\OpenMP\\metadirective-user.f90":352:82): block with no terminator, has 
# | "fir.if"(%5) ({
# |   "omp.barrier"() : () -> ()
# |   "fir.result"() : () -> ()
# | }, {
# |   "omp.taskwait"() <{operandSegmentSizes = array<i32: 0, 0>}> : () -> ()
# |   "fir.result"() : () -> ()
# | }) : (i1) -> ()
# | error: loc("C:\\_work\\llvm-project\\llvm-project\\flang\\test\\Lower\\OpenMP\\metadirective-user.f90":376:84): block with no terminator, has 
# | "fir.if"(%3) ({
# |   "omp.barrier"() : () -> ()
# |   "fir.result"() : () -> ()
# | }, {
# |   "omp.taskwait"() <{operandSegmentSizes = array<i32: 0, 0>}> : () -> ()
# |   "fir.result"() : () -> ()
# | }) : (i1) -> ()
# | error: loc("C:\\_work\\llvm-project\\llvm-project\\flang\\test\\Lower\\OpenMP\\metadirective-user.f90":419:97): block with no terminator, has 
# | "fir.if"(%3) ({
# |   "omp.barrier"() : () -> ()
# |   "fir.result"() : () -> ()
# | }, {
# |   "omp.taskwait"() <{operandSegmentSizes = array<i32: 0, 0>}> : () -> ()
# |   "fir.result"() : () -> ()
# | }) : (i1) -> ()
# | error: loc("C:\\_work\\llvm-project\\llvm-project\\flang\\test\\Lower\\OpenMP\\metadirective-user.f90":463:32): block with no terminator, has 
# | "fir.if"(%4) ({
# |   "omp.barrier"() : () -> ()
# |   "fir.result"() : () -> ()
# | }, {
# |   %5 = "fir.load"(%2#0) : (!fir.ref<!fir.logical<4>>) -> !fir.logical<4>
# |   %6 = "fir.convert"(%5) : (!fir.logical<4>) -> i1
# |   "fir.if"(%6) ({
# |     "omp.taskwait"() <{operandSegmentSizes = array<i32: 0, 0>}> : () -> ()
# |     "fir.result"() : () -> ()
# |   }, {
# |     "omp.taskyield"() : () -> ()
# |     "fir.result"() : () -> ()
# |   }) : (i1) -> ()
# |   "fir.result"() : () -> ()
# | }) : (i1) -> ()
# | error: loc("C:\\_work\\llvm-project\\llvm-project\\flang\\test\\Lower\\OpenMP\\metadirective-user.f90":501:32): block with no terminator, has 
# | "fir.if"(%5) ({
# |   "omp.barrier"() : () -> ()
# |   "fir.result"() : () -> ()
# | }, {
# |   %6 = "fir.load"(%2#0) : (!fir.ref<!fir.logical<4>>) -> !fir.logical<4>
# |   %7 = "fir.convert"(%6) : (!fir.logical<4>) -> i1
# |   "fir.if"(%7) ({
# |     "omp.taskwait"() <{operandSegmentSizes = array<i32: 0, 0>}> : () -> ()
# |     "fir.result"() : () -> ()
# |   }, {
# |     %8 = "fir.load"(%3#0) : (!fir.ref<!fir.logical<4>>) -> !fir.logical<4>
# |     %9 = "fir.convert"(%8) : (!fir.logical<4>) -> i1
# |     "fir.if"(%9) ({
# |       "omp.taskyield"() : () -> ()
# |       "fir.result"() : () -> ()
# |     }, {
# |       "fir.result"() : () -> ()
# |     }) : (i1) -> ()
# |     "fir.result"() : () -> ()
# |   }) : (i1) -> ()
# |   "fir.result"() : () -> ()
# | }) : (i1) -> ()
# | error: loc("C:\\_work\\llvm-project\\llvm-project\\flang\\test\\Lower\\OpenMP\\metadirective-user.f90":534:63): block with no terminator, has 
# | "fir.if"(%4) ({
# |   "omp.barrier"() : () -> ()
# |   "fir.result"() : () -> ()
# | }, {
# |   %5 = "fir.load"(%2#0) : (!fir.ref<!fir.logical<4>>) -> !fir.logical<4>
# |   %6 = "fir.convert"(%5) : (!fir.logical<4>) -> i1
# |   "fir.if"(%6) ({
# |     "omp.taskyield"() : () -> ()
# |     "fir.result"() : () -> ()
# |   }, {
# |     "omp.taskwait"() <{operandSegmentSizes = array<i32: 0, 0>}> : () -> ()
# |     "fir.result"() : () -> ()
# |   }) : (i1) -> ()
# |   "fir.result"() : () -> ()
# | }) : (i1) -> ()
# | error: verification of lowering to FIR failed
# `-----------------------------
# error: command failed with exit status: 1
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\flang\test\Lower\OpenMP\metadirective-user.f90'
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line:  c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\flang\test\Lower\OpenMP\metadirective-user.f90
# `-----------------------------
# error: command failed with exit status: 2

--

```
</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/204345


More information about the flang-commits mailing list