From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 844D83858D1E; Thu, 22 Feb 2024 02:51:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 844D83858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1708570286; bh=bLO1IBkgt2iGy3uRcJGiHVjOJDEUGqno3KXFDslzCfs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=BLoySIg1wMiNnPNGa5gtaBE1QCwnbIM5ZvXLHb62vxzEn7b0XfYrjqSroHJs+OarJ TRBz9R4EEvdLaiGO/HRhZMLxZidHtExlmqq6Ik9eshanQJT4+NLq+y/DJGtRW5wJzC PGzCrtFQceLNddtSL+yEwrxdQvEvJJUyX/7ZGJTo= From: "bergner at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/100799] Stackoverflow in optimized code on PPC Date: Thu, 22 Feb 2024 02:51:21 +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: X-Bugzilla-Severity: normal X-Bugzilla-Who: bergner at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jskumari 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=3D100799 --- Comment #24 from Peter Bergner --- (In reply to Jakub Jelinek from comment #23) > if the PowerPC backend maintainers wanted, there could be a similar worka= round > on the rs6000 backend side, in the decisions whether the callee can use > the parameter save area or not ignore counting DECL_HIDDEN_STRING_LENGTH > PARM_DECLs, so if e.g. 9 arguments are passed but one of them is > DECL_HIDDEN_STRING_LENGTH, assume parameter save area is not there. If the callee has 9 arguments, even if one is a hidden str len arg, then th= ere MUST be a parameter save area, since that is where the callee is supposed to load the 9th argument from. There is simply no other location that 9th argument exists at. I think the only viable rs6000 workaround is for the caller to allocate a parameter save area in some cases where it doesn't think it needs one. Ie,= the caller is calling a function which it thinks has 8 parameters and there mig= ht be a hidden one (maybe one param is a string or whatever the Fortran CHARAC= TER with len great than 1 maps to) because the callee might be a Fortran routin= e.=20 That would solve the problem of the callee scribbling data into the caller's frame, but wouldn't solve the issue of the caller didn't actually place a v= alid value for the missing hidden parameter. Thoughts on that?=