https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108575
--- Comment #3 from Nikos Tosis <ergasies.uni at gmail dot com> --- (In reply to Christophe Lyon from comment #2) > I may be reading the code incorrectly, but ISTM that rtu_AngleMecIn is the > 3rd parameter of the function, so you pass &UnitDelay_DSTATE, > while you pass &Sig_MechanicalAngle as 5th parameter. > > So it's normal that (*rtu_AngleMecIn) and (Sig_MechanicalAngle) have > different values. This is the declaration void ConvertPWMtoAngle(const int16_T *rtu_qSollin, const boolean_T *rtu_detectStartUpin, const real32_T *rtu_AngleMecIn, real32_T *rty_AngleElec, real32_T *rty_AnlgleMec) and this is the call ConvertPWMtoAngle(&qSoll, &rtb_UnitDelay_n, &UnitDelay_DSTATE, &rtb_AngleCalculation_o1, &Sig_MechanicalAngle); qSoll = 1 rtb_UnitDelay_n = 2 UnitDelay_DSTATE = 3 rtb_AngleCalculation_o1 = 4 Sig_MechanicalAngle = 5 The code is auto genenated from Matlab but I see that everything is ok.