[flang-commits] [flang] [Flang]Fix the build with the EXPENSIVE_CHECKS enabled (PR #162541)

via flang-commits flang-commits at lists.llvm.org
Wed Oct 8 13:04:54 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-flang-fir-hlfir

Author: Alexey Bataev (alexey-bataev)

<details>
<summary>Changes</summary>

Both clang/gcc emit error message for this code without `template` keyword


---
Full diff: https://github.com/llvm/llvm-project/pull/162541.diff


1 Files Affected:

- (modified) flang/lib/Optimizer/CodeGen/CodeGen.cpp (+1-1) 


``````````diff
diff --git a/flang/lib/Optimizer/CodeGen/CodeGen.cpp b/flang/lib/Optimizer/CodeGen/CodeGen.cpp
index 50603cb86e4a5..4a05cd919abe5 100644
--- a/flang/lib/Optimizer/CodeGen/CodeGen.cpp
+++ b/flang/lib/Optimizer/CodeGen/CodeGen.cpp
@@ -3348,7 +3348,7 @@ struct DoConcurrentSpecifierOpConversion : public fir::FIROpConversion<OpTy> {
                   mlir::ConversionPatternRewriter &rewriter) const override {
 #ifdef EXPENSIVE_CHECKS
     auto uses = mlir::SymbolTable::getSymbolUses(
-        specifier, specifier->getParentOfType<mlir::ModuleOp>());
+        specifier, specifier->template getParentOfType<mlir::ModuleOp>());
 
     // `fir.local|fir.declare_reduction` ops are not supposed to have any uses
     // at this point (i.e. during lowering to LLVM). In case of serialization,

``````````

</details>


https://github.com/llvm/llvm-project/pull/162541


More information about the flang-commits mailing list