Fix bug in bytecode compilation of 1st deriv of external functions

master
Sébastien Villemot 2022-05-20 12:35:23 +02:00
parent 03dc9837d0
commit d1a3b227fd
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 12 additions and 1 deletions

View File

@ -7760,7 +7760,18 @@ FirstDerivExternalFunctionNode::compileExternalFunctionOutput(ostream &CompileCo
int first_deriv_symb_id = datatree.external_functions_table.getFirstDerivSymbID(symb_id);
assert(first_deriv_symb_id != ExternalFunctionsTable::IDSetButNoNameProvided);
if (first_deriv_symb_id == symb_id || alreadyWrittenAsTefTerm(first_deriv_symb_id, tef_terms))
/* For a node with derivs provided by the user function, call the method
on the non-derived node */
if (first_deriv_symb_id == symb_id)
{
expr_t parent = datatree.AddExternalFunction(symb_id, arguments);
parent->compileExternalFunctionOutput(CompileCode, instruction_number, lhs_rhs,
temporary_terms, temporary_terms_idxs,
dynamic, steady_dynamic, tef_terms);
return;
}
if (alreadyWrittenAsTefTerm(first_deriv_symb_id, tef_terms))
return;
unsigned int nb_add_input_arguments = compileExternalFunctionArguments(CompileCode, instruction_number, lhs_rhs, temporary_terms,