Skip to content

Revert "[flang][cuda] Use a reference for asyncObject (#138010)" #138082

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions flang-rt/include/flang-rt/runtime/allocator-registry.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

namespace Fortran::runtime {

using AllocFct = void *(*)(std::size_t, std::int64_t *);
using AllocFct = void *(*)(std::size_t, std::int64_t);
using FreeFct = void (*)(void *);

typedef struct Allocator_t {
Expand All @@ -28,7 +28,7 @@ typedef struct Allocator_t {
} Allocator_t;

static RT_API_ATTRS void *MallocWrapper(
std::size_t size, [[maybe_unused]] std::int64_t *) {
std::size_t size, [[maybe_unused]] std::int64_t) {
return std::malloc(size);
}
#ifdef RT_DEVICE_COMPILATION
Expand Down
6 changes: 3 additions & 3 deletions flang-rt/include/flang-rt/runtime/descriptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
#include <cstdio>
#include <cstring>

/// Value used for asyncObject when no specific stream is specified.
static constexpr std::int64_t *kNoAsyncObject = nullptr;
/// Value used for asyncId when no specific stream is specified.
static constexpr std::int64_t kNoAsyncId = -1;

namespace Fortran::runtime {

Expand Down Expand Up @@ -372,7 +372,7 @@ class Descriptor {
// before calling. It (re)computes the byte strides after
// allocation. Does not allocate automatic components or
// perform default component initialization.
RT_API_ATTRS int Allocate(std::int64_t *asyncObject);
RT_API_ATTRS int Allocate(std::int64_t asyncId);
RT_API_ATTRS void SetByteStrides();

// Deallocates storage; does not call FINAL subroutines or
Expand Down
2 changes: 1 addition & 1 deletion flang-rt/include/flang-rt/runtime/reduction-templates.h
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ inline RT_API_ATTRS void DoMaxMinNorm2(Descriptor &result, const Descriptor &x,
// as the element size of the source.
result.Establish(x.type(), x.ElementBytes(), nullptr, 0, nullptr,
CFI_attribute_allocatable);
if (int stat{result.Allocate(kNoAsyncObject)}) {
if (int stat{result.Allocate(kNoAsyncId)}) {
terminator.Crash(
"%s: could not allocate memory for result; STAT=%d", intrinsic, stat);
}
Expand Down
8 changes: 4 additions & 4 deletions flang-rt/lib/cuda/allocatable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace Fortran::runtime::cuda {
extern "C" {
RT_EXT_API_GROUP_BEGIN

int RTDEF(CUFAllocatableAllocateSync)(Descriptor &desc, int64_t *stream,
int RTDEF(CUFAllocatableAllocateSync)(Descriptor &desc, int64_t stream,
bool *pinned, bool hasStat, const Descriptor *errMsg,
const char *sourceFile, int sourceLine) {
int stat{RTNAME(CUFAllocatableAllocate)(
Expand All @@ -41,7 +41,7 @@ int RTDEF(CUFAllocatableAllocateSync)(Descriptor &desc, int64_t *stream,
return stat;
}

int RTDEF(CUFAllocatableAllocate)(Descriptor &desc, int64_t *stream,
int RTDEF(CUFAllocatableAllocate)(Descriptor &desc, int64_t stream,
bool *pinned, bool hasStat, const Descriptor *errMsg,
const char *sourceFile, int sourceLine) {
if (desc.HasAddendum()) {
Expand All @@ -63,7 +63,7 @@ int RTDEF(CUFAllocatableAllocate)(Descriptor &desc, int64_t *stream,
}

int RTDEF(CUFAllocatableAllocateSource)(Descriptor &alloc,
const Descriptor &source, int64_t *stream, bool *pinned, bool hasStat,
const Descriptor &source, int64_t stream, bool *pinned, bool hasStat,
const Descriptor *errMsg, const char *sourceFile, int sourceLine) {
int stat{RTNAME(CUFAllocatableAllocate)(
alloc, stream, pinned, hasStat, errMsg, sourceFile, sourceLine)};
Expand All @@ -76,7 +76,7 @@ int RTDEF(CUFAllocatableAllocateSource)(Descriptor &alloc,
}

int RTDEF(CUFAllocatableAllocateSourceSync)(Descriptor &alloc,
const Descriptor &source, int64_t *stream, bool *pinned, bool hasStat,
const Descriptor &source, int64_t stream, bool *pinned, bool hasStat,
const Descriptor *errMsg, const char *sourceFile, int sourceLine) {
int stat{RTNAME(CUFAllocatableAllocateSync)(
alloc, stream, pinned, hasStat, errMsg, sourceFile, sourceLine)};
Expand Down
20 changes: 10 additions & 10 deletions flang-rt/lib/cuda/allocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,15 @@ static unsigned findAllocation(void *ptr) {
return allocNotFound;
}

static void insertAllocation(void *ptr, std::size_t size, cudaStream_t stream) {
static void insertAllocation(void *ptr, std::size_t size, std::int64_t stream) {
CriticalSection critical{lock};
initAllocations();
if (numDeviceAllocations >= maxDeviceAllocations) {
doubleAllocationArray();
}
deviceAllocations[numDeviceAllocations].ptr = ptr;
deviceAllocations[numDeviceAllocations].size = size;
deviceAllocations[numDeviceAllocations].stream = stream;
deviceAllocations[numDeviceAllocations].stream = (cudaStream_t)stream;
++numDeviceAllocations;
qsort(deviceAllocations, numDeviceAllocations, sizeof(DeviceAllocation),
compareDeviceAlloc);
Expand Down Expand Up @@ -136,26 +136,26 @@ void RTDEF(CUFRegisterAllocator)() {
}

void *CUFAllocPinned(
std::size_t sizeInBytes, [[maybe_unused]] std::int64_t *asyncObject) {
std::size_t sizeInBytes, [[maybe_unused]] std::int64_t asyncId) {
void *p;
CUDA_REPORT_IF_ERROR(cudaMallocHost((void **)&p, sizeInBytes));
return p;
}

void CUFFreePinned(void *p) { CUDA_REPORT_IF_ERROR(cudaFreeHost(p)); }

void *CUFAllocDevice(std::size_t sizeInBytes, std::int64_t *asyncObject) {
void *CUFAllocDevice(std::size_t sizeInBytes, std::int64_t asyncId) {
void *p;
if (Fortran::runtime::executionEnvironment.cudaDeviceIsManaged) {
CUDA_REPORT_IF_ERROR(
cudaMallocManaged((void **)&p, sizeInBytes, cudaMemAttachGlobal));
} else {
if (asyncObject == kNoAsyncObject) {
if (asyncId == kNoAsyncId) {
CUDA_REPORT_IF_ERROR(cudaMalloc(&p, sizeInBytes));
} else {
CUDA_REPORT_IF_ERROR(
cudaMallocAsync(&p, sizeInBytes, (cudaStream_t)*asyncObject));
insertAllocation(p, sizeInBytes, (cudaStream_t)*asyncObject);
cudaMallocAsync(&p, sizeInBytes, (cudaStream_t)asyncId));
insertAllocation(p, sizeInBytes, asyncId);
}
}
return p;
Expand All @@ -174,7 +174,7 @@ void CUFFreeDevice(void *p) {
}

void *CUFAllocManaged(
std::size_t sizeInBytes, [[maybe_unused]] std::int64_t *asyncObject) {
std::size_t sizeInBytes, [[maybe_unused]] std::int64_t asyncId) {
void *p;
CUDA_REPORT_IF_ERROR(
cudaMallocManaged((void **)&p, sizeInBytes, cudaMemAttachGlobal));
Expand All @@ -184,9 +184,9 @@ void *CUFAllocManaged(
void CUFFreeManaged(void *p) { CUDA_REPORT_IF_ERROR(cudaFree(p)); }

void *CUFAllocUnified(
std::size_t sizeInBytes, [[maybe_unused]] std::int64_t *asyncObject) {
std::size_t sizeInBytes, [[maybe_unused]] std::int64_t asyncId) {
// Call alloc managed for the time being.
return CUFAllocManaged(sizeInBytes, asyncObject);
return CUFAllocManaged(sizeInBytes, asyncId);
}

void CUFFreeUnified(void *p) {
Expand Down
2 changes: 1 addition & 1 deletion flang-rt/lib/cuda/descriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ RT_EXT_API_GROUP_BEGIN
Descriptor *RTDEF(CUFAllocDescriptor)(
std::size_t sizeInBytes, const char *sourceFile, int sourceLine) {
return reinterpret_cast<Descriptor *>(
CUFAllocManaged(sizeInBytes, /*asyncObject=*/nullptr));
CUFAllocManaged(sizeInBytes, /*asyncId*/ -1));
}

void RTDEF(CUFFreeDescriptor)(
Expand Down
12 changes: 6 additions & 6 deletions flang-rt/lib/runtime/allocatable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,17 +133,17 @@ void RTDEF(AllocatableApplyMold)(
}
}

int RTDEF(AllocatableAllocate)(Descriptor &descriptor,
std::int64_t *asyncObject, bool hasStat, const Descriptor *errMsg,
const char *sourceFile, int sourceLine) {
int RTDEF(AllocatableAllocate)(Descriptor &descriptor, std::int64_t asyncId,
bool hasStat, const Descriptor *errMsg, const char *sourceFile,
int sourceLine) {
Terminator terminator{sourceFile, sourceLine};
if (!descriptor.IsAllocatable()) {
return ReturnError(terminator, StatInvalidDescriptor, errMsg, hasStat);
} else if (descriptor.IsAllocated()) {
return ReturnError(terminator, StatBaseNotNull, errMsg, hasStat);
} else {
int stat{ReturnError(
terminator, descriptor.Allocate(asyncObject), errMsg, hasStat)};
int stat{
ReturnError(terminator, descriptor.Allocate(asyncId), errMsg, hasStat)};
if (stat == StatOk) {
if (const DescriptorAddendum * addendum{descriptor.Addendum()}) {
if (const auto *derived{addendum->derivedType()}) {
Expand All @@ -162,7 +162,7 @@ int RTDEF(AllocatableAllocateSource)(Descriptor &alloc,
const Descriptor &source, bool hasStat, const Descriptor *errMsg,
const char *sourceFile, int sourceLine) {
int stat{RTNAME(AllocatableAllocate)(
alloc, /*asyncObject=*/nullptr, hasStat, errMsg, sourceFile, sourceLine)};
alloc, /*asyncId=*/-1, hasStat, errMsg, sourceFile, sourceLine)};
if (stat == StatOk) {
Terminator terminator{sourceFile, sourceLine};
DoFromSourceAssign(alloc, source, terminator);
Expand Down
4 changes: 2 additions & 2 deletions flang-rt/lib/runtime/array-constructor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ static RT_API_ATTRS void AllocateOrReallocateVectorIfNeeded(
initialAllocationSize(fromElements, to.ElementBytes())};
to.GetDimension(0).SetBounds(1, allocationSize);
RTNAME(AllocatableAllocate)
(to, /*asyncObject=*/nullptr, /*hasStat=*/false, /*errMsg=*/nullptr,
(to, /*asyncId=*/-1, /*hasStat=*/false, /*errMsg=*/nullptr,
vector.sourceFile, vector.sourceLine);
to.GetDimension(0).SetBounds(1, fromElements);
vector.actualAllocationSize = allocationSize;
Expand All @@ -59,7 +59,7 @@ static RT_API_ATTRS void AllocateOrReallocateVectorIfNeeded(
// first value: there should be no reallocation.
RUNTIME_CHECK(terminator, previousToElements >= fromElements);
RTNAME(AllocatableAllocate)
(to, /*asyncObject=*/nullptr, /*hasStat=*/false, /*errMsg=*/nullptr,
(to, /*asyncId=*/-1, /*hasStat=*/false, /*errMsg=*/nullptr,
vector.sourceFile, vector.sourceLine);
vector.actualAllocationSize = previousToElements;
}
Expand Down
4 changes: 2 additions & 2 deletions flang-rt/lib/runtime/assign.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ static RT_API_ATTRS int AllocateAssignmentLHS(
toDim.SetByteStride(stride);
stride *= toDim.Extent();
}
int result{ReturnError(terminator, to.Allocate(kNoAsyncObject))};
int result{ReturnError(terminator, to.Allocate(kNoAsyncId))};
if (result == StatOk && derived && !derived->noInitializationNeeded()) {
result = ReturnError(terminator, Initialize(to, *derived, terminator));
}
Expand Down Expand Up @@ -277,7 +277,7 @@ RT_API_ATTRS void Assign(Descriptor &to, const Descriptor &from,
// entity, otherwise, the Deallocate() below will not
// free the descriptor memory.
newFrom.raw().attribute = CFI_attribute_allocatable;
auto stat{ReturnError(terminator, newFrom.Allocate(kNoAsyncObject))};
auto stat{ReturnError(terminator, newFrom.Allocate(kNoAsyncId))};
if (stat == StatOk) {
if (HasDynamicComponent(from)) {
// If 'from' has allocatable/automatic component, we cannot
Expand Down
20 changes: 9 additions & 11 deletions flang-rt/lib/runtime/character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static RT_API_ATTRS void Compare(Descriptor &result, const Descriptor &x,
for (int j{0}; j < rank; ++j) {
result.GetDimension(j).SetBounds(1, ub[j]);
}
if (result.Allocate(kNoAsyncObject) != CFI_SUCCESS) {
if (result.Allocate(kNoAsyncId) != CFI_SUCCESS) {
terminator.Crash("Compare: could not allocate storage for result");
}
std::size_t xChars{x.ElementBytes() >> shift<CHAR>};
Expand Down Expand Up @@ -173,7 +173,7 @@ static RT_API_ATTRS void AdjustLRHelper(Descriptor &result,
for (int j{0}; j < rank; ++j) {
result.GetDimension(j).SetBounds(1, ub[j]);
}
if (result.Allocate(kNoAsyncObject) != CFI_SUCCESS) {
if (result.Allocate(kNoAsyncId) != CFI_SUCCESS) {
terminator.Crash("ADJUSTL/R: could not allocate storage for result");
}
for (SubscriptValue resultAt{0}; elements-- > 0;
Expand Down Expand Up @@ -227,7 +227,7 @@ static RT_API_ATTRS void LenTrim(Descriptor &result, const Descriptor &string,
for (int j{0}; j < rank; ++j) {
result.GetDimension(j).SetBounds(1, ub[j]);
}
if (result.Allocate(kNoAsyncObject) != CFI_SUCCESS) {
if (result.Allocate(kNoAsyncId) != CFI_SUCCESS) {
terminator.Crash("LEN_TRIM: could not allocate storage for result");
}
std::size_t stringElementChars{string.ElementBytes() >> shift<CHAR>};
Expand Down Expand Up @@ -427,7 +427,7 @@ static RT_API_ATTRS void GeneralCharFunc(Descriptor &result,
for (int j{0}; j < rank; ++j) {
result.GetDimension(j).SetBounds(1, ub[j]);
}
if (result.Allocate(kNoAsyncObject) != CFI_SUCCESS) {
if (result.Allocate(kNoAsyncId) != CFI_SUCCESS) {
terminator.Crash("SCAN/VERIFY: could not allocate storage for result");
}
std::size_t stringElementChars{string.ElementBytes() >> shift<CHAR>};
Expand Down Expand Up @@ -530,8 +530,7 @@ static RT_API_ATTRS void MaxMinHelper(Descriptor &accumulator,
for (int j{0}; j < rank; ++j) {
accumulator.GetDimension(j).SetBounds(1, ub[j]);
}
RUNTIME_CHECK(
terminator, accumulator.Allocate(kNoAsyncObject) == CFI_SUCCESS);
RUNTIME_CHECK(terminator, accumulator.Allocate(kNoAsyncId) == CFI_SUCCESS);
}
for (CHAR *result{accumulator.OffsetElement<CHAR>()}; elements-- > 0;
accumData += accumChars, result += chars, x.IncrementSubscripts(xAt)) {
Expand Down Expand Up @@ -607,7 +606,7 @@ void RTDEF(CharacterConcatenate)(Descriptor &accumulator,
for (int j{0}; j < rank; ++j) {
accumulator.GetDimension(j).SetBounds(1, ub[j]);
}
if (accumulator.Allocate(kNoAsyncObject) != CFI_SUCCESS) {
if (accumulator.Allocate(kNoAsyncId) != CFI_SUCCESS) {
terminator.Crash(
"CharacterConcatenate: could not allocate storage for result");
}
Expand All @@ -630,8 +629,7 @@ void RTDEF(CharacterConcatenateScalar1)(
accumulator.set_base_addr(nullptr);
std::size_t oldLen{accumulator.ElementBytes()};
accumulator.raw().elem_len += chars;
RUNTIME_CHECK(
terminator, accumulator.Allocate(kNoAsyncObject) == CFI_SUCCESS);
RUNTIME_CHECK(terminator, accumulator.Allocate(kNoAsyncId) == CFI_SUCCESS);
std::memcpy(accumulator.OffsetElement<char>(oldLen), from, chars);
FreeMemory(old);
}
Expand Down Expand Up @@ -833,7 +831,7 @@ void RTDEF(Repeat)(Descriptor &result, const Descriptor &string,
std::size_t origBytes{string.ElementBytes()};
result.Establish(string.type(), origBytes * ncopies, nullptr, 0, nullptr,
CFI_attribute_allocatable);
if (result.Allocate(kNoAsyncObject) != CFI_SUCCESS) {
if (result.Allocate(kNoAsyncId) != CFI_SUCCESS) {
terminator.Crash("REPEAT could not allocate storage for result");
}
const char *from{string.OffsetElement()};
Expand Down Expand Up @@ -867,7 +865,7 @@ void RTDEF(Trim)(Descriptor &result, const Descriptor &string,
}
result.Establish(string.type(), resultBytes, nullptr, 0, nullptr,
CFI_attribute_allocatable);
RUNTIME_CHECK(terminator, result.Allocate(kNoAsyncObject) == CFI_SUCCESS);
RUNTIME_CHECK(terminator, result.Allocate(kNoAsyncId) == CFI_SUCCESS);
std::memcpy(result.OffsetElement(), string.OffsetElement(), resultBytes);
}

Expand Down
4 changes: 2 additions & 2 deletions flang-rt/lib/runtime/copy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ RT_API_ATTRS void CopyElement(const Descriptor &to, const SubscriptValue toAt[],
*reinterpret_cast<Descriptor *>(toPtr + component->offset())};
if (toDesc.raw().base_addr != nullptr) {
toDesc.set_base_addr(nullptr);
RUNTIME_CHECK(terminator,
toDesc.Allocate(/*asyncObject=*/nullptr) == CFI_SUCCESS);
RUNTIME_CHECK(
terminator, toDesc.Allocate(/*asyncId=*/-1) == CFI_SUCCESS);
const Descriptor &fromDesc{*reinterpret_cast<const Descriptor *>(
fromPtr + component->offset())};
copyStack.emplace(toDesc, fromDesc);
Expand Down
6 changes: 3 additions & 3 deletions flang-rt/lib/runtime/derived.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ RT_API_ATTRS int Initialize(const Descriptor &instance,
allocDesc.raw().attribute = CFI_attribute_allocatable;
if (comp.genre() == typeInfo::Component::Genre::Automatic) {
stat = ReturnError(
terminator, allocDesc.Allocate(kNoAsyncObject), errMsg, hasStat);
terminator, allocDesc.Allocate(kNoAsyncId), errMsg, hasStat);
if (stat == StatOk) {
if (const DescriptorAddendum * addendum{allocDesc.Addendum()}) {
if (const auto *derived{addendum->derivedType()}) {
Expand Down Expand Up @@ -153,7 +153,7 @@ RT_API_ATTRS int InitializeClone(const Descriptor &clone,
if (origDesc.IsAllocated()) {
cloneDesc.ApplyMold(origDesc, origDesc.rank());
stat = ReturnError(
terminator, cloneDesc.Allocate(kNoAsyncObject), errMsg, hasStat);
terminator, cloneDesc.Allocate(kNoAsyncId), errMsg, hasStat);
if (stat == StatOk) {
if (const DescriptorAddendum * addendum{cloneDesc.Addendum()}) {
if (const typeInfo::DerivedType *
Expand Down Expand Up @@ -260,7 +260,7 @@ static RT_API_ATTRS void CallFinalSubroutine(const Descriptor &descriptor,
copy.raw().attribute = CFI_attribute_allocatable;
Terminator stubTerminator{"CallFinalProcedure() in Fortran runtime", 0};
RUNTIME_CHECK(terminator ? *terminator : stubTerminator,
copy.Allocate(kNoAsyncObject) == CFI_SUCCESS);
copy.Allocate(kNoAsyncId) == CFI_SUCCESS);
ShallowCopyDiscontiguousToContiguous(copy, descriptor);
argDescriptor = &copy;
}
Expand Down
4 changes: 2 additions & 2 deletions flang-rt/lib/runtime/descriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ RT_API_ATTRS static inline int MapAllocIdx(const Descriptor &desc) {
#endif
}

RT_API_ATTRS int Descriptor::Allocate(std::int64_t *asyncObject) {
RT_API_ATTRS int Descriptor::Allocate(std::int64_t asyncId) {
std::size_t elementBytes{ElementBytes()};
if (static_cast<std::int64_t>(elementBytes) < 0) {
// F'2023 7.4.4.2 p5: "If the character length parameter value evaluates
Expand All @@ -170,7 +170,7 @@ RT_API_ATTRS int Descriptor::Allocate(std::int64_t *asyncObject) {
// Zero size allocation is possible in Fortran and the resulting
// descriptor must be allocated/associated. Since std::malloc(0)
// result is implementation defined, always allocate at least one byte.
void *p{alloc(byteSize ? byteSize : 1, asyncObject)};
void *p{alloc(byteSize ? byteSize : 1, asyncId)};
if (!p) {
return CFI_ERROR_MEM_ALLOCATION;
}
Expand Down
4 changes: 2 additions & 2 deletions flang-rt/lib/runtime/extrema.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ inline RT_API_ATTRS void CharacterMaxOrMinLoc(const char *intrinsic,
CFI_attribute_allocatable);
result.GetDimension(0).SetBounds(1, extent[0]);
Terminator terminator{source, line};
if (int stat{result.Allocate(kNoAsyncObject)}) {
if (int stat{result.Allocate(kNoAsyncId)}) {
terminator.Crash(
"%s: could not allocate memory for result; STAT=%d", intrinsic, stat);
}
Expand Down Expand Up @@ -181,7 +181,7 @@ inline RT_API_ATTRS void TotalNumericMaxOrMinLoc(const char *intrinsic,
CFI_attribute_allocatable);
result.GetDimension(0).SetBounds(1, extent[0]);
Terminator terminator{source, line};
if (int stat{result.Allocate(kNoAsyncObject)}) {
if (int stat{result.Allocate(kNoAsyncId)}) {
terminator.Crash(
"%s: could not allocate memory for result; STAT=%d", intrinsic, stat);
}
Expand Down
2 changes: 1 addition & 1 deletion flang-rt/lib/runtime/findloc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ void RTDEF(Findloc)(Descriptor &result, const Descriptor &x,
CFI_attribute_allocatable);
result.GetDimension(0).SetBounds(1, extent[0]);
Terminator terminator{source, line};
if (int stat{result.Allocate(kNoAsyncObject)}) {
if (int stat{result.Allocate(kNoAsyncId)}) {
terminator.Crash(
"FINDLOC: could not allocate memory for result; STAT=%d", stat);
}
Expand Down
Loading
Loading