[flang-commits] [flang] [flang][OpenMP] Implement loop nest parser (PR #168884)

LLVM Continuous Integration via flang-commits flang-commits at lists.llvm.org
Sat Nov 22 10:38:09 PST 2025


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `openmp-offload-sles-build-only` running on `rocm-worker-hw-04-sles` while building `flang` at step 5 "compile-openmp".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/140/builds/34538

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 5 (compile-openmp) failure: build (failure)
...
 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/ProfileData/InstrProf.h: In member function ‘std::vector<llvm::InstrProfValueSiteRecord>& llvm::InstrProfRecord::getOrCreateValueSitesForKind(uint32_t)’:
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/ProfileData/InstrProf.h:1036:0: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
     assert(IPVK_First <= ValueKind && ValueKind <= IPVK_Last &&
 
At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-ctad-maybe-unsupported’
cc1plus: warning: unrecognized command line option ‘-Wno-deprecated-copy’
289.842 [56/2/7472] Building CXX object tools/flang/lib/Frontend/CMakeFiles/flangFrontend.dir/ParserActions.cpp.o
376.596 [56/1/7473] Building CXX object tools/flang/lib/Parser/CMakeFiles/FortranParser.dir/openmp-parsers.cpp.o
FAILED: tools/flang/lib/Parser/CMakeFiles/FortranParser.dir/openmp-parsers.cpp.o 
ccache /usr/bin/c++ -DFLANG_INCLUDE_TESTS=1 -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/flang/lib/Parser -I/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/lib/Parser -I/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/include -Itools/flang/include -Iinclude -I/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include -isystem /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/../mlir/include -isystem tools/mlir/include -isystem tools/clang/include -isystem /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/../clang/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-array-bounds -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-deprecated-copy -Wno-ctad-maybe-unsupported -fno-semantic-interposition -fpch-preprocess -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++1z -Winvalid-pch -include /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/tools/flang/lib/Parser/CMakeFiles/FortranParser.dir/cmake_pch.hxx -MD -MT tools/flang/lib/Parser/CMakeFiles/FortranParser.dir/openmp-parsers.cpp.o -MF tools/flang/lib/Parser/CMakeFiles/FortranParser.dir/openmp-parsers.cpp.o.d -o tools/flang/lib/Parser/CMakeFiles/FortranParser.dir/openmp-parsers.cpp.o -c /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/lib/Parser/openmp-parsers.cpp
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/lib/Parser/openmp-parsers.cpp: In member function ‘void Fortran::parser::OmpDirectiveNameParser::initTokens(std::vector<std::pair<std::__cxx11::basic_string<char>, llvm::omp::Directive> >*) const’:
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/lib/Parser/openmp-parsers.cpp:241:24: warning: unused variable ‘_’ [-Wunused-variable]
     for (auto &[name, _] : spellings) {
                        ^
In file included from /usr/include/c++/7/x86_64-suse-linux/bits/c++allocator.h:33:0,
                 from /usr/include/c++/7/bits/allocator.h:46,
                 from /usr/include/c++/7/string:41,
                 from /usr/include/c++/7/stdexcept:39,
                 from /usr/include/c++/7/array:39,
                 from /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/include/flang/Common/enum-class.h:20,
                 from /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/include/flang/Common/idioms.h:26,
                 from /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/include/flang/Parser/user-state.h:17,
                 from /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/include/flang/Parser/parse-state.h:18,
                 from /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/include/flang/Parser/instrumented-parser.h:12,
                 from /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/include/flang/Parser/parsing.h:12,
                 from /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/tools/flang/lib/Parser/CMakeFiles/FortranParser.dir/cmake_pch.hxx:5,
                 from <command-line>:0:
/usr/include/c++/7/ext/new_allocator.h: In instantiation of ‘void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = Fortran::parser::ExecutionPartConstruct; _Args = {const Fortran::parser::ExecutionPartConstruct&}; _Tp = std::_List_node<Fortran::parser::ExecutionPartConstruct>]’:
/usr/include/c++/7/bits/alloc_traits.h:475:4:   required from ‘static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = Fortran::parser::ExecutionPartConstruct; _Args = {const Fortran::parser::ExecutionPartConstruct&}; _Tp = std::_List_node<Fortran::parser::ExecutionPartConstruct>; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<std::_List_node<Fortran::parser::ExecutionPartConstruct> >]’
/usr/include/c++/7/bits/stl_list.h:575:33:   required from ‘std::__cxx11::list<_Tp, _Alloc>::_Node* std::__cxx11::list<_Tp, _Alloc>::_M_create_node(_Args&& ...) [with _Args = {const Fortran::parser::ExecutionPartConstruct&}; _Tp = Fortran::parser::ExecutionPartConstruct; _Alloc = std::allocator<Fortran::parser::ExecutionPartConstruct>; std::__cxx11::list<_Tp, _Alloc>::_Node = std::_List_node<Fortran::parser::ExecutionPartConstruct>]’
/usr/include/c++/7/bits/stl_list.h:1801:32:   required from ‘void std::__cxx11::list<_Tp, _Alloc>::_M_insert(std::__cxx11::list<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const Fortran::parser::ExecutionPartConstruct&}; _Tp = Fortran::parser::ExecutionPartConstruct; _Alloc = std::allocator<Fortran::parser::ExecutionPartConstruct>; std::__cxx11::list<_Tp, _Alloc>::iterator = std::_List_iterator<Fortran::parser::ExecutionPartConstruct>]’
/usr/include/c++/7/bits/stl_list.h:1133:4:   required from ‘std::__cxx11::list<_Tp, _Alloc>::reference std::__cxx11::list<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {const Fortran::parser::ExecutionPartConstruct&}; _Tp = Fortran::parser::ExecutionPartConstruct; _Alloc = std::allocator<Fortran::parser::ExecutionPartConstruct>; std::__cxx11::list<_Tp, _Alloc>::reference = Fortran::parser::ExecutionPartConstruct&]’
/usr/include/c++/7/bits/stl_list.h:1730:18:   required from ‘void std::__cxx11::list<_Tp, _Alloc>::_M_initialize_dispatch(_InputIterator, _InputIterator, std::__false_type) [with _InputIterator = std::_List_const_iterator<Fortran::parser::ExecutionPartConstruct>; _Tp = Fortran::parser::ExecutionPartConstruct; _Alloc = std::allocator<Fortran::parser::ExecutionPartConstruct>]’
/usr/include/c++/7/bits/stl_list.h:655:31:   [ skipping 3 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
/usr/include/c++/7/optional:492:54:   required from ‘constexpr std::optional<_Tp>::optional(_Up&&) [with _Up = std::__cxx11::list<Fortran::parser::ExecutionPartConstruct>&; typename std::enable_if<std::__and_<std::__not_<std::is_same<std::optional<_Tp>, typename std::decay<_U1>::type> >, std::__not_<std::is_same<std::in_place_t, typename std::decay<_U1>::type> >, std::is_constructible<_Tp, _Up&&>, std::is_convertible<_Up&&, _Tp> >::value, bool>::type <anonymous> = 1; _Tp = std::__cxx11::list<Fortran::parser::ExecutionPartConstruct>]’
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/lib/Parser/openmp-parsers.cpp:74:14:   required from ‘std::optional<std::__cxx11::list<Fortran::parser::ExecutionPartConstruct> > Fortran::parser::AsBlockParser<ExecParser>::Parse(Fortran::parser::ParseState&) const [with ExecParser = Fortran::parser::PredicatedParser<Fortran::parser::Parser<Fortran::parser::ExecutionPartConstruct>, Fortran::parser::OmpLoopConstructParser::Parse(Fortran::parser::ParseState&) const::<lambda(auto:23&)> >]’
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/lib/Parser/basic-parsers.h:329:12:   required from ‘void Fortran::parser::AlternativesParser<PA, Ps>::ParseRest(std::optional<typename PA::resultType>&, Fortran::parser::ParseState&, Fortran::parser::ParseState&) const [with int J = 1; PA = Fortran::parser::LoopNestParser; Ps = {Fortran::parser::AsBlockParser<Fortran::parser::PredicatedParser<Fortran::parser::Parser<Fortran::parser::ExecutionPartConstruct>, Fortran::parser::OmpLoopConstructParser::Parse(Fortran::parser::ParseState&) const::<lambda(auto:23&)> > >}; typename PA::resultType = std::__cxx11::list<Fortran::parser::ExecutionPartConstruct>]’
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/lib/Parser/basic-parsers.h:316:21:   required from ‘std::optional<typename PA::resultType> Fortran::parser::AlternativesParser<PA, Ps>::Parse(Fortran::parser::ParseState&) const [with PA = Fortran::parser::LoopNestParser; Ps = {Fortran::parser::AsBlockParser<Fortran::parser::PredicatedParser<Fortran::parser::Parser<Fortran::parser::ExecutionPartConstruct>, Fortran::parser::OmpLoopConstructParser::Parse(Fortran::parser::ParseState&) const::<lambda(auto:23&)> > >}; typename PA::resultType = std::__cxx11::list<Fortran::parser::ExecutionPartConstruct>]’
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/lib/Parser/basic-parsers.h:109:31:   required from ‘std::optional<typename PA::resultType> Fortran::parser::BacktrackingParser<A>::Parse(Fortran::parser::ParseState&) const [with A = Fortran::parser::AlternativesParser<Fortran::parser::LoopNestParser, Fortran::parser::AsBlockParser<Fortran::parser::PredicatedParser<Fortran::parser::Parser<Fortran::parser::ExecutionPartConstruct>, Fortran::parser::OmpLoopConstructParser::Parse(Fortran::parser::ParseState&) const::<lambda(auto:23&)> > > >; typename PA::resultType = std::__cxx11::list<Fortran::parser::ExecutionPartConstruct>]’
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/lib/Parser/openmp-parsers.cpp:1935:54:   required from here
/usr/include/c++/7/ext/new_allocator.h:136:4: error: use of deleted function ‘Fortran::parser::ExecutionPartConstruct::ExecutionPartConstruct(const Fortran::parser::ExecutionPartConstruct&)’
  { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/include/flang/Parser/user-state.h:19:0,
                 from /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/include/flang/Parser/parse-state.h:18,
                 from /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/include/flang/Parser/instrumented-parser.h:12,
                 from /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/flang/include/flang/Parser/parsing.h:12,

```

</details>

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


More information about the flang-commits mailing list