[flang-commits] [flang] [flang] Fix BoxAnalyzer.h for LLVM_ENABLE_EXPENSIVE_CHECKS (PR #96675)
via flang-commits
flang-commits at lists.llvm.org
Tue Jun 25 11:28:43 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-flang-fir-hlfir
Author: None (dpalermo)
<details>
<summary>Changes</summary>
Fixes assert seen trying to default number of inlined elements for `SmallVector<T>` but `sizeof(T)` is really big. Seen with -DLLVM_ENABLE_EXPENSIVE_CHECKS.
---
Full diff: https://github.com/llvm/llvm-project/pull/96675.diff
1 Files Affected:
- (modified) flang/include/flang/Lower/BoxAnalyzer.h (+1-1)
``````````diff
diff --git a/flang/include/flang/Lower/BoxAnalyzer.h b/flang/include/flang/Lower/BoxAnalyzer.h
index 3b8e2455ff273..8eca7d66a71bf 100644
--- a/flang/include/flang/Lower/BoxAnalyzer.h
+++ b/flang/include/flang/Lower/BoxAnalyzer.h
@@ -97,7 +97,7 @@ struct ScalarDynamicDerived : ScalarSym {
: ScalarSym{sym}, lens{std::move(lens)} {}
private:
- llvm::SmallVector<Fortran::lower::SomeExpr> lens;
+ llvm::SmallVector<Fortran::lower::SomeExpr, 1> lens;
};
struct LBoundsAndShape {
``````````
</details>
https://github.com/llvm/llvm-project/pull/96675
More information about the flang-commits
mailing list