[clang] [flang] [flang][semantics] Add a flag to relax some of the semantic constraints on C_LOC (PR #195112)
Andre Kuhlenschmidt via cfe-commits
cfe-commits at lists.llvm.org
Fri May 1 12:48:41 PDT 2026
================
@@ -3539,20 +3554,24 @@ std::optional<SpecificCall> IntrinsicProcTable::Implementation::HandleC_Loc(
"C_LOC() argument has non-interoperable intrinsic type or kind"_warn_en_US);
}
}
-
characteristics::DummyDataObject ddo{std::move(*typeAndShape)};
ddo.intent = common::Intent::In;
- return SpecificCall{
- SpecificIntrinsic{"__builtin_c_loc"s,
- characteristics::Procedure{
- characteristics::FunctionResult{
- DynamicType{GetBuiltinDerivedType(
- builtinsScope_, "__builtin_c_ptr")}},
- characteristics::DummyArguments{
- characteristics::DummyArgument{"x"s, std::move(ddo)}},
- characteristics::Procedure::Attrs{
- characteristics::Procedure::Attr::Pure}}},
- std::move(arguments)};
+ specificCall.specificIntrinsic.characteristics.value()
+ .dummyArguments.emplace_back(
+ characteristics::DummyArgument{"x", std::move(ddo)});
+ specificCall.arguments.emplace_back(std::move(arguments[0]));
+ return specificCall;
+ } else if (expr && IsProcedurePointer(*expr)) {
+ auto dummyArg{characteristics::DummyArgument::FromActual(
----------------
akuhlens wrote:
Yup, for some reason I didn't think DummyProcedures would have intent.
https://github.com/llvm/llvm-project/pull/195112
More information about the cfe-commits
mailing list