File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -1680,15 +1680,11 @@ class ScalarExprLowering {
1680
1680
// Explicitly map statement function host associated symbols to their
1681
1681
// parent scope lowered symbol box.
1682
1682
for (const Fortran::semantics::SymbolRef &sym :
1683
- Fortran::evaluate::CollectSymbols (*details.stmtFunction ())) {
1683
+ Fortran::evaluate::CollectSymbols (*details.stmtFunction ()))
1684
1684
if (const auto *details =
1685
- sym->detailsIf <Fortran::semantics::HostAssocDetails>()) {
1686
- if (!symMap.lookupSymbol (*sym)) {
1687
- symMap.addSymbol (
1688
- *sym, symMap.lookupSymbol (details->symbol ()).toExtendedValue ());
1689
- }
1690
- }
1691
- }
1685
+ sym->detailsIf <Fortran::semantics::HostAssocDetails>())
1686
+ if (!symMap.lookupSymbol (*sym))
1687
+ symMap.addSymbol (*sym, gen (details->symbol ()));
1692
1688
1693
1689
auto result = genval (details.stmtFunction ().value ());
1694
1690
LLVM_DEBUG (llvm::dbgs () << " stmt-function: " << result << ' \n ' );
Original file line number Diff line number Diff line change @@ -2248,15 +2248,17 @@ struct CoordinateOpConversion
2248
2248
}
2249
2249
2250
2250
int64_t getIntValue (mlir::Value val) const {
2251
- if (val)
2251
+ if (val) {
2252
2252
if (auto defop = val.getDefiningOp ()) {
2253
2253
if (auto constOp = dyn_cast<mlir::ConstantIntOp>(defop))
2254
2254
return constOp.getValue ();
2255
2255
else if (auto llConstOp = dyn_cast<mlir::LLVM::ConstantOp>(defop))
2256
2256
if (auto attr = llConstOp.value ().dyn_cast <mlir::IntegerAttr>())
2257
2257
return attr.getValue ().getSExtValue ();
2258
2258
}
2259
- llvm_unreachable (" must be a constant" );
2259
+ fir::emitFatalError (val.getLoc (), " must be a constant" );
2260
+ }
2261
+ llvm_unreachable (" must not be null value" );
2260
2262
}
2261
2263
}; // namespace
2262
2264
You can’t perform that action at this time.
0 commit comments