From 53394c74f4a228bc0336583748f8ab70d5efb79c Mon Sep 17 00:00:00 2001 From: Michael Lange Date: Wed, 18 Dec 2024 14:50:13 +0100 Subject: [PATCH] Inline: Better way to skip intrinsic function calls in stmt func inliner Co-authored-by: Balthasar Reuter <6384870+reuterbal@users.noreply.github.com> --- loki/transformations/inline/mapper.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/loki/transformations/inline/mapper.py b/loki/transformations/inline/mapper.py index 7803f11fa..1ea0e0f8c 100644 --- a/loki/transformations/inline/mapper.py +++ b/loki/transformations/inline/mapper.py @@ -58,8 +58,7 @@ def map_procedure_symbol(self, expr, *args, **kwargs): return expr.clone(parent=parent) def map_inline_call(self, expr, *args, **kwargs): - if expr.procedure_type is None or expr.procedure_type is BasicType.DEFERRED \ - or expr.procedure_type.is_intrinsic: + if expr.procedure_type in (None, BasicType.DEFERRED) or expr.procedure_type.is_intrinsic: # Unkonw inline call, potentially an intrinsic # We still need to recurse and ensure re-scoping return super().map_inline_call(expr, *args, **kwargs)