[flang-commits] [clang] [flang] [flang][semantics] Add a flag to relax some of the semantic constraints on C_LOC (PR #195112)

via flang-commits flang-commits at lists.llvm.org
Thu Apr 30 09:15:26 PDT 2026


github-actions[bot] wrote:

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

* 54268 tests passed
* 991 tests skipped

All executed tests passed, but another part of the build **failed**. Click on a failure below to see the details.

<details>
<summary>tools/flang/lib/Evaluate/CMakeFiles/FortranEvaluate.dir/intrinsics.cpp.o</summary>

```
FAILED: tools/flang/lib/Evaluate/CMakeFiles/FortranEvaluate.dir/intrinsics.cpp.o
sccache /opt/llvm/bin/clang++ -DFLANG_INCLUDE_TESTS=1 -DHAS_QUADMATHLIB -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/flang/lib/Evaluate -I/home/gha/actions-runner/_work/llvm-project/llvm-project/flang/lib/Evaluate -I/home/gha/actions-runner/_work/llvm-project/llvm-project/flang/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/flang/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include -isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/../mlir/include -isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/mlir/include -isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/include -isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/../clang/include -gmlt -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-deprecated-copy -Wno-string-conversion -Wno-ctad-maybe-unsupported -Wno-unused-command-line-argument -Wstring-conversion           -Wcovered-switch-default -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17 -UNDEBUG -fno-exceptions -funwind-tables -fno-rtti -MD -MT tools/flang/lib/Evaluate/CMakeFiles/FortranEvaluate.dir/intrinsics.cpp.o -MF tools/flang/lib/Evaluate/CMakeFiles/FortranEvaluate.dir/intrinsics.cpp.o.d -o tools/flang/lib/Evaluate/CMakeFiles/FortranEvaluate.dir/intrinsics.cpp.o -c /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/lib/Evaluate/intrinsics.cpp
/home/gha/actions-runner/_work/llvm-project/llvm-project/flang/lib/Evaluate/intrinsics.cpp:3567:17: error: no member named 'intent' in 'Fortran::evaluate::characteristics::DummyArgument'
3567 |       dummyArg->intent = common::Intent::In;
|       ~~~~~~~~~~^
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/lib/Evaluate/intrinsics.cpp:9:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/include/flang/Evaluate/intrinsics.h:12:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/include/flang/Evaluate/call.h:12:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/include/flang/Evaluate/common.h:13:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/include/flang/Common/enum-set.h:18:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/include/flang/Common/idioms.h:26:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/include/flang/Common/enum-class.h:21:
In file included from /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/functional:63:
In file included from /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/unordered_map:41:
In file included from /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unordered_map.h:33:
In file included from /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/hashtable.h:35:
In file included from /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/hashtable_policy.h:39:
In file included from /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/ext/alloc_traits.h:34:
In file included from /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/alloc_traits.h:39:
In file included from /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/allocator.h:46:
In file included from /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/x86_64-linux-gnu/c++/13/bits/c++allocator.h:33:
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/new_allocator.h:191:23: error: no matching constructor for initialization of 'Fortran::evaluate::characteristics::DummyArgument'
191 |         { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
|                              ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/alloc_traits.h:538:8: note: in instantiation of function template specialization 'std::__new_allocator<Fortran::evaluate::characteristics::DummyArgument>::construct<Fortran::evaluate::characteristics::DummyArgument, Fortran::evaluate::characteristics::DummyDataObject>' requested here
538 |           __a.construct(__p, std::forward<_Args>(__args)...);
|               ^
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/vector.tcc:117:21: note: in instantiation of function template specialization 'std::allocator_traits<std::allocator<Fortran::evaluate::characteristics::DummyArgument>>::construct<Fortran::evaluate::characteristics::DummyArgument, Fortran::evaluate::characteristics::DummyDataObject>' requested here
117 |             _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish,
|                            ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/flang/lib/Evaluate/intrinsics.cpp:3560:27: note: in instantiation of function template specialization 'std::vector<Fortran::evaluate::characteristics::DummyArgument>::emplace_back<Fortran::evaluate::characteristics::DummyDataObject>' requested here
3560 |           .dummyArguments.emplace_back(std::move(ddo));
|                           ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/flang/include/flang/Evaluate/characteristics.h:294:40: note: candidate constructor not viable: no known conversion from 'Fortran::evaluate::characteristics::DummyDataObject' to 'const DummyArgument' for 1st argument
294 |   DECLARE_CONSTRUCTORS_AND_ASSIGNMENTS(DummyArgument)
|   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/flang/include/flang/Evaluate/common.h:179:3: note: expanded from macro 'DECLARE_CONSTRUCTORS_AND_ASSIGNMENTS'
179 |   t(const t &); \
|   ^ ~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/flang/include/flang/Evaluate/characteristics.h:294:40: note: candidate constructor not viable: no known conversion from 'Fortran::evaluate::characteristics::DummyDataObject' to 'DummyArgument' for 1st argument
294 |   DECLARE_CONSTRUCTORS_AND_ASSIGNMENTS(DummyArgument)
|   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/flang/include/flang/Evaluate/common.h:180:3: note: expanded from macro 'DECLARE_CONSTRUCTORS_AND_ASSIGNMENTS'
180 |   t(t &&); \
|   ^ ~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/flang/include/flang/Evaluate/characteristics.h:299:12: note: candidate constructor not viable: no known conversion from 'Fortran::evaluate::characteristics::DummyDataObject' to 'AlternateReturn' for 1st argument
299 |   explicit DummyArgument(AlternateReturn &&x) : u{std::move(x)} {}
|            ^             ~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/flang/include/flang/Evaluate/characteristics.h:295:3: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
295 |   DummyArgument(std::string &&name, DummyDataObject &&x)
|   ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/flang/include/flang/Evaluate/characteristics.h:297:3: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
297 |   DummyArgument(std::string &&name, DummyProcedure &&x)
|   ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
```
</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/195112


More information about the flang-commits mailing list