[flang] File omp_lib.f90 is not a standard intrinsic module
authorValentin Clement <clementval@gmail.com>
Fri, 1 Jul 2022 10:04:19 +0000 (12:04 +0200)
committerValentin Clement <clementval@gmail.com>
Fri, 1 Jul 2022 10:05:18 +0000 (12:05 +0200)
This patch is part of the upstreaming effort from fir-dev branch.

Reviewed By: jeanPerier

Differential Revision: https://reviews.llvm.org/D128976

Co-authored-by: V Donaldson <vdonaldson@nvidia.com>
flang/lib/Lower/ConvertExpr.cpp

index 7f3bcc8..a9651b8 100644 (file)
@@ -577,7 +577,8 @@ isIntrinsicModuleProcRef(const Fortran::evaluate::ProcedureRef &procRef) {
     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 {