Flang对多维数组的大小支持有限
对于多维数组,当每一维的元素个数比较多,生成的IR大于2GB时,会编译失败。失败信息如下:
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.
或如下:
fatal error: sorry, this include generates a translation unit too large for Clang to process.
父主题: Flang兼容性