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 @@ -3579,8 +3579,8 @@ static void genOpenMPDeclareMapperImpl(
35793579 mapperNameStr = converter.mangleName (mapperNameStr, sym->owner ());
35803580 }
35813581
3582- // If the mapper op already exists (e.g., created by regular lowering),
3583- // do not recreate it.
3582+ // If the mapper op already exists (e.g., created by regular lowering or by
3583+ // materialization of imported mappers), do not recreate it.
35843584 if (converter.getModuleOp ().lookupSymbol (mapperNameStr))
35853585 return ;
35863586
@@ -4272,12 +4272,8 @@ void Fortran::lower::materializeOpenMPDeclareMappers(
42724272 return ;
42734273
42744274 // Only materialize for modules coming from mod files to avoid duplicates.
4275- if (const semantics::Symbol *modSym = root.symbol ()) {
4276- if (!modSym->test (semantics::Symbol::Flag::ModFile))
4277- return ;
4278- } else {
4275+ if (!root.symbol () || !root.symbol ()->test (semantics::Symbol::Flag::ModFile))
42794276 return ;
4280- }
42814277
42824278 // Scan symbols in this module scope for MapperDetails.
42834279 for (auto &it : root) {
You can’t perform that action at this time.
0 commit comments