[flang-commits] [flang] [flang][OpenMP] Use utility functions to get things from OmpObject (PR #206066)

Dmitry Vasilyev via flang-commits flang-commits at lists.llvm.org
Mon Jun 29 11:55:35 PDT 2026


slydiman wrote:

https://lab.llvm.org/buildbot/#/builders/166/builds/9664
openmp-utils.cpp(157):
```
FAILED: [code=2] tools/flang/lib/Semantics/CMakeFiles/FortranSemantics.dir/openmp-utils.cpp.obj 
ccache C:\PROGRA~1\MICROS~2\18\COMMUN~1\VC\Tools\MSVC\1451~1.362\bin\Hostx64\x64\cl.exe  /nologo /TP -DFLANG_INCLUDE_TESTS=1 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_GLIBCXX_ASSERTIONS -D_HAS_EXCEPTIONS=0 -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -IC:\buildbot\flang-x86_64-windows\build\tools\flang\lib\Semantics -IC:\buildbot\flang-x86_64-windows\llvm-project\flang\lib\Semantics -IC:\buildbot\flang-x86_64-windows\llvm-project\flang\include -IC:\buildbot\flang-x86_64-windows\build\tools\flang\include -IC:\buildbot\flang-x86_64-windows\build\include -IC:\buildbot\flang-x86_64-windows\llvm-project\llvm\include -external:IC:\buildbot\flang-x86_64-windows\llvm-project\flang\..\mlir\include -external:IC:\buildbot\flang-x86_64-windows\build\tools\mlir\include -external:IC:\buildbot\flang-x86_64-windows\build\tools\clang\include -external:IC:\buildbot\flang-x86_64-windows\llvm-project\llvm\..\clang\include -external:W0 /DWIN32 /D_WINDOWS   /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4146 -wd4244 -wd4267 -wd4456 -wd4457 -wd4458 -wd4459 -wd4624 -wd4100 -wd4127 -wd4505 -wd4702 -wd4245 -wd4310 -wd4701 -wd4703 -wd4389 -wd4805 -wd4577 -wd4319 -wd4324 -wd4251 -wd4275 -w14062 -we4238 /Gw /O2 /Ob2  -std:c++17 -MD -UNDEBUG /EHs-c- /GR- /showIncludes /Fotools\flang\lib\Semantics\CMakeFiles\FortranSemantics.dir\openmp-utils.cpp.obj /Fdtools\flang\lib\Semantics\CMakeFiles\FortranSemantics.dir\FortranSemantics.pdb /FS -c C:\buildbot\flang-x86_64-windows\llvm-project\flang\lib\Semantics\openmp-utils.cpp
C:\Program Files\Microsoft Visual Studio\18\Community\VC\Tools\MSVC\14.51.36231\include\variant(1599): error C2338: static assertion failed: 'visit() requires the result of all potential invocations to have the same type and value category (N4950 [variant.visit]/5).'
C:\Program Files\Microsoft Visual Studio\18\Community\VC\Tools\MSVC\14.51.36231\include\variant(1599): note: the template instantiation context (the oldest one first) is
..\llvm-project\flang\lib\Semantics\openmp-utils.cpp(157): note: see reference to function template instantiation 'const Fortran::semantics::Symbol *std::visit<Fortran::common::visitors<Fortran::semantics::omp::GetObjectSymbol::<lambda_1>,Fortran::semantics::omp::GetObjectSymbol::<lambda_2>>,const std::variant<Fortran::parser::FunctionReference,Fortran::parser::OmpReservedIdentifier>&,void>(_Callable &&,const std::variant<Fortran::parser::FunctionReference,Fortran::parser::OmpReservedIdentifier> &)' being compiled
            _Callable=Fortran::common::visitors<Fortran::semantics::omp::GetObjectSymbol::<lambda_1>,Fortran::semantics::omp::GetObjectSymbol::<lambda_2>>
ninja: build stopped: subcommand failed.
program finished with exit code 2
```
Please take a look.

https://github.com/llvm/llvm-project/pull/206066


More information about the flang-commits mailing list