From a623e137eb903cf4c11437d1914e56dc592a6ce6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Fri, 5 Jun 2020 14:50:06 +0200
Subject: [PATCH] Bug fix: allow external functions in model local variables

(cherry picked from commit 931935a9420804db7e7d528659ef3be2801886d6)
---
 src/ModelTree.cc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/ModelTree.cc b/src/ModelTree.cc
index ba5b30e8..08d38348 100644
--- a/src/ModelTree.cc
+++ b/src/ModelTree.cc
@@ -1367,6 +1367,8 @@ ModelTree::writeModelLocalVariableTemporaryTerms(temporary_terms_t &temp_term_un
 
   for (auto &it : temporary_terms_mlv)
     {
+      it.second->writeExternalFunctionOutput(output, output_type, temp_term_union, tt_idxs, tef_terms);
+
       if (isJuliaOutput(output_type))
         output << "    @inbounds const ";
 
-- 
GitLab