diff --git a/flang/runtime/assign.cpp b/flang/runtime/assign.cpp index 458a1ba006b690..237acb0c89fc2e 100644 --- a/flang/runtime/assign.cpp +++ b/flang/runtime/assign.cpp @@ -263,10 +263,12 @@ RT_API_ATTRS static void Assign( } std::size_t toElementBytes{to.ElementBytes()}; std::size_t fromElementBytes{from.ElementBytes()}; - auto isSimpleMemmove{[&]() { + // The following lambda definition violates the conding style, + // but cuda-11.8 nvcc hits an internal error with the brace initialization. + auto isSimpleMemmove = [&]() { return !toDerived && to.rank() == from.rank() && to.IsContiguous() && from.IsContiguous() && toElementBytes == fromElementBytes; - }}; + }; StaticDescriptor deferredDeallocStatDesc; Descriptor *deferDeallocation{nullptr}; if (MayAlias(to, from)) {