diff --git a/flang/lib/Lower/ConvertExpr.cpp b/flang/lib/Lower/ConvertExpr.cpp --- a/flang/lib/Lower/ConvertExpr.cpp +++ b/flang/lib/Lower/ConvertExpr.cpp @@ -577,7 +577,8 @@ return false; const Fortran::semantics::Symbol *module = symbol->GetUltimate().owner().GetSymbol(); - return module && module->attrs().test(Fortran::semantics::Attr::INTRINSIC); + return module && module->attrs().test(Fortran::semantics::Attr::INTRINSIC) && + module->name().ToString().find("omp_lib") == std::string::npos; } namespace {