Rate This Document
Findability
Accuracy
Completeness
Readability

Flang Has Limited Support for the Size of Multidimensional Arrays

For a multidimensional array, if the number of elements in each dimension is large and the generated IR is greater than 2 GB, the compilation fails. The failure information is as follows:

1
clang::FileID clang::SourceManager::createFileID(const clang::SrcMgr::ContentCache*, llvm::StringRef, clang::SourceLocation, clang::SrcMgr::CharacteristicKind, int, unsigned int): Assertion `NextLocalOffset + FileSize + 1 > NextLocalOffset && NextLocalOffset + FileSize + 1 <= CurrentLoadedOffset && "Ran out of source locations!"' failed.

Or as follows:

1
fatal error: sorry, this include generates a translation unit too large for Clang to process.