From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CF5E33857713; Wed, 26 Apr 2023 10:41:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CF5E33857713 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682505687; bh=cU+SfNn0tk6dzQVYIlGTcfvRVHkoT2okX21oTZZJdz4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PvCjZxAGdnCuFhHEgsoTyH281IHjA2B+CPTvan+2bA8Vg6X2qLgcL7Ibi6jHG/cDv 2b9jN+/2LkjaQP2BfkG+tLyl4htvX2GSZuT4kd8WVnNNsmVJDg3JUF8d/fZG067qem 2c4ZLTnNrNZcMvV7xxCYirXYL5ZRwdKNRdgx9pwQ= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/109609] [12/13 Regression] tail call for function even when passing a ptr which references a local array still Date: Wed, 26 Apr 2023 10:41:26 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.3 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=3D109609 --- Comment #19 from CVS Commits --- The releases/gcc-12 branch has been updated by Richard Biener : https://gcc.gnu.org/g:2c7e89510fe41265b285e886d19f9895adf545e8 commit r12-9474-g2c7e89510fe41265b285e886d19f9895adf545e8 Author: Richard Biener Date: Tue Apr 25 14:56:44 2023 +0200 tree-optimization/109609 - correctly interpret arg size in fnspec By majority vote and a hint from the API name which is arg_max_access_size_given_by_arg_p this interprets a memory access size specified as given as other argument such as for strncpy in the testcase which has "1cO313" as specifying the _maximum_ size read/written rather than the exact size. There are two uses interpreting it that way already and one differing. The following adjusts the differing and clarifies the documentation. PR tree-optimization/109609 * attr-fnspec.h (arg_max_access_size_given_by_arg_p): Clarify semantics. * tree-ssa-alias.cc (check_fnspec): Correctly interpret the size given by arg_max_access_size_given_by_arg_p as maximum, not exact, size. * gcc.dg/torture/pr109609.c: New testcase. (cherry picked from commit e8d00353017f895d03a9eabae3506fd126ce1a2d)=