File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -3569,8 +3569,8 @@ static void genOpenMPDeclareMapperImpl(
35693569 mapperNameStr = converter.mangleName (mapperNameStr, sym->owner ());
35703570 }
35713571
3572- // If the mapper op already exists (e.g., created by regular lowering),
3573- // do not recreate it.
3572+ // If the mapper op already exists (e.g., created by regular lowering or by
3573+ // materialization of imported mappers), do not recreate it.
35743574 if (converter.getModuleOp ().lookupSymbol (mapperNameStr))
35753575 return ;
35763576
@@ -4262,12 +4262,8 @@ void Fortran::lower::materializeOpenMPDeclareMappers(
42624262 return ;
42634263
42644264 // Only materialize for modules coming from mod files to avoid duplicates.
4265- if (const semantics::Symbol *modSym = root.symbol ()) {
4266- if (!modSym->test (semantics::Symbol::Flag::ModFile))
4267- return ;
4268- } else {
4265+ if (!root.symbol () || !root.symbol ()->test (semantics::Symbol::Flag::ModFile))
42694266 return ;
4270- }
42714267
42724268 // Scan symbols in this module scope for MapperDetails.
42734269 for (auto &it : root) {
You can’t perform that action at this time.
0 commit comments