From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 006F53857002; Tue, 12 Oct 2021 13:10:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 006F53857002 From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/102649] GCC 9.3.1 LTO bug -- incorrect function call, bad stack arguments pushed Date: Tue, 12 Oct 2021 13:10:48 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 9.3.1 X-Bugzilla-Keywords: lto, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Oct 2021 13:10:49 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102649 --- Comment #3 from Martin Li=C5=A1ka --- All right, so being in the described situation I would recommend the follow= ing steps: 1) please try bisecting GCC revisions and find the first on that fixed the issue in between version 9.x and 10.x release. That would tell us more. 2) You can experiment with -fno-lto, which you can use for a subset of obje= ct files (the rest will be built with LTO). Doing that, you will be able to isolate that to a minimal set of objects that need -flto in order to expose= the issue. 3) You can use -fdump-tree-all for LTO linking step and you can investigate= if the caller really calls the function with an argument being set to 0.=