From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 68D623858D35; Tue, 28 Jul 2020 09:09:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 68D623858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1595927359; bh=/O/f0brVFG/4TVhiU+hPlfZIjwHcMynGo/B0N3TWsCs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Xx+qsGWqXF2Q8RbmkYxZHridvcs/kWSd7rFl3ju9OLfliz7JTi1QZ0uR2t5g99nXB 6nnpf2Wb1k3HYWTIomj18OsFvy/rlkjSOjIyEpq67brj8EYNG21spUCIQnK86sNJuS N0SCqsjvBHjWGfr0wAduQee0wdDI2ONsS1iVGWiU= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/96335] [10/11 Regression] ICE in maybe_warn_rdwr_sizes since r10-4929 Date: Tue, 28 Jul 2020 09:09:19 +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: 10.0 X-Bugzilla-Keywords: ice-on-valid-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: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.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 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, 28 Jul 2020 09:09:19 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96335 --- Comment #2 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:f9264b9008386ac3b5c795472c222fa524b127b0 commit r11-2379-gf9264b9008386ac3b5c795472c222fa524b127b0 Author: Jakub Jelinek Date: Tue Jul 28 11:08:29 2020 +0200 expander: Fix ICE in maybe_warn_rdwr_sizes [PR96335] The following testcase ICEs in maybe_warn_rdwr_sizes. The problem is t= hat the caller uses its fndecl and fntype variables to fill up rdwr_map, and the fntype in that case is a prototype with the access attribute and all the checks needed for that performed. But the maybe_warn_rdwr_sizes function tries to rediscover fndecl/fntype itself and does it different= ly from how the caller did (for fndecl get_callee_fndecl and fntype from t= hat FUNCTION_DECL, otherwise sets fntype to CALL_EXPR_FN's type). On the testcase, get_callee_fndecl does find a FUNCTION_DECL because it does STRIP_NOPS in between. Instead of trying to rediscover those, this patch just passes them down, like is done in several other functions. 2020-07-28 Jakub Jelinek PR middle-end/96335 * calls.c (maybe_warn_rdwr_sizes): Add FNDECL and FNTYPE argume= nts, instead of trying to rediscover them in the body. (initialize_argument_information): Adjust caller. * gcc.dg/pr96335.c: New test.=