[flang-commits] [flang] 55e60c3 - [flang] Fix BoxAnalyzer.h for LLVM_ENABLE_EXPENSIVE_CHECKS (#96675)

via flang-commits flang-commits at lists.llvm.org
Tue Jun 25 18:12:34 PDT 2024


Author: dpalermo
Date: 2024-06-25T21:12:32-04:00
New Revision: 55e60c35212e0cf293572499ee74e96438d64b99

URL: https://github.com/llvm/llvm-project/commit/55e60c35212e0cf293572499ee74e96438d64b99
DIFF: https://github.com/llvm/llvm-project/commit/55e60c35212e0cf293572499ee74e96438d64b99.diff

LOG: [flang] Fix BoxAnalyzer.h for LLVM_ENABLE_EXPENSIVE_CHECKS (#96675)

Fixes assert seen trying to use default number of inlined elements for
`SmallVector<T>` but `sizeof(T)` is really big. Seen with
-DLLVM_ENABLE_EXPENSIVE_CHECKS.

Added: 
    

Modified: 
    flang/include/flang/Lower/BoxAnalyzer.h

Removed: 
    


################################################################################
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 {


        


More information about the flang-commits mailing list