﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
4730	Issue with function generation after NF processing	Francesco Casella	Per Östlund	"Please check the [https://libraries.openmodelica.org/branches/newInst/Modelica_3.2.2/files/Modelica_3.2.2_Modelica.Electrical.Analog.Examples.AmplifierWithOpAmpDetailed.err Modelica.Electrical.Analog.Examples.AmplifierWithOpAmpDetailed] model in the MSL. When compiled with the NF, the SimCode module later fails with this error:
{{{
Modelica_3.2.2_Modelica.Electrical.Analog.Examples.AmplifierWithOpAmpDetailed.c:210:109:
error: too many arguments to function call, expected single argument 'threadData', have 7 arguments
data->localData[0]->realVars[30] /* opAmp.q_sum_help variable */ = omc_opAmp_FCNq__sum__limit(threadData, data->localData[0]->realVars[29] /* opAmp.q_sum variable */, data->localData[0]->realVars[0] /* opAmp.q_fp1 STATE(1) */, 
data->simulationInfo->realParameter[0], data->simulationInfo->realParameter[1], data->simulationInfo->realParameter[32], data->simulationInfo->realParameter[30]);
}}}

Apparently there is something wrong in how the function {{{opAmp.FCNq_sum_limit}}} is handled to the code generation phase.

The only difference revealed by flattening the model with OMEdit is that the old FE defines {{{function Modelica.Electrical.Analog.Basic.OpAmpDetailed.FCNiout_limit}}}, while the new FE defines {{{function opAmp.FCNiout_limit}}}. I'm not sure whether this is relevant or not."	defect	closed	high	2.0.0	New Instantiation		fixed		
