diff --git a/flang/lib/Lower/Bridge.cpp b/flang/lib/Lower/Bridge.cpp --- a/flang/lib/Lower/Bridge.cpp +++ b/flang/lib/Lower/Bridge.cpp @@ -423,7 +423,10 @@ //===--------------------------------------------------------------------===// mlir::Value getSymbolAddress(Fortran::lower::SymbolRef sym) override final { - return lookupSymbol(sym).getAddr(); + Fortran::lower::SymbolBox symBox = lookupSymbol(sym); + if (!symBox) + TODO(getCurrentLocation(), "symbol lookup failed"); + return symBox.getAddr(); } fir::ExtendedValue diff --git a/flang/lib/Lower/OpenMP.cpp b/flang/lib/Lower/OpenMP.cpp --- a/flang/lib/Lower/OpenMP.cpp +++ b/flang/lib/Lower/OpenMP.cpp @@ -500,6 +500,10 @@ } }; for (const Fortran::parser::OmpObject &ompObject : objectList.v) { + if (Fortran::parser::Unwrap(ompObject) || + Fortran::parser::Unwrap(ompObject)) + TODO(converter.getCurrentLocation(), + "OpenMP Array Expressions or Structure Components as List elements"); Fortran::semantics::Symbol *sym = getOmpObjectSymbol(ompObject); addOperands(*sym); } @@ -677,7 +681,8 @@ llvm::SmallVector mapTypes; auto addMapClause = [&firOpBuilder, &converter, &mapOperands, - &mapTypes](const auto &mapClause) { + &mapTypes](const auto &mapClause, + mlir::Location ¤tLocation) { auto mapType = std::get( std::get>(mapClause->v.t) ->t); @@ -723,6 +728,12 @@ converter, mapOperand); for (mlir::Value mapOp : mapOperand) { + mlir::Type checkType = mapOp.getType(); + if (auto refType = checkType.dyn_cast()) + checkType = refType.getElementType(); + if (auto boxType = checkType.dyn_cast()) + TODO(currentLocation, "OMPD_target_data MapOperand BoxType"); + mapOperands.push_back(mapOp); mapTypes.push_back(mapTypeAttr); } @@ -758,7 +769,7 @@ nowaitAttr = firOpBuilder.getUnitAttr(); } else if (const auto &mapClause = std::get_if(&clause.u)) { - addMapClause(mapClause); + addMapClause(mapClause, currentLocation); } else { TODO(currentLocation, "OMPD_target unhandled clause"); }