From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CBB023858D28; Fri, 27 Jan 2023 20:59:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CBB023858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674853173; bh=ABtMa5ac46ZGmVSLbh/pwDO/vIRWmwleLtgqie/6Zwc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=sZiYTPw3xy6afyLXYEMCtiVSYxLhzNhfrmv9/kEtHLozB2YizpjCK4M9QhL/v6TtA qFAssdIGHM+6+gquVKrDbYfE5msQSIHXyN2n4kkfMBdrbdj6WCS5sk0Dd3GfPnthEI eJkUHOvXU5mfZsjR8yFivkN+e1uJvbJKrx6IWghg= From: "ergasies.uni at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/108575] Bug in gcc arm non eabi Date: Fri, 27 Jan 2023 20:59:33 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 10.3.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: ergasies.uni at gmail dot com X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108575 --- Comment #3 from Nikos Tosis --- (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. >=20 > So it's normal that (*rtu_AngleMecIn) and (Sig_MechanicalAngle) have > different values. This is the declaration=20 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 =3D 1=20 rtb_UnitDelay_n =3D 2 UnitDelay_DSTATE =3D 3 rtb_AngleCalculation_o1 =3D 4 Sig_MechanicalAngle =3D 5 The code is auto genenated from Matlab but I see that everything is ok.=