From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BB9D03938C25; Wed, 19 May 2021 10:06:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BB9D03938C25 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/100576] [11/12 Regression] ICE at -O1 and above: in decompose, at wide-int.h:984 since r11-2928-gd14c547abd484d35 Date: Wed, 19 May 2021 10:06:20 +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.0 X-Bugzilla-Keywords: diagnostic, 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: 11.2 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: Wed, 19 May 2021 10:06:20 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100576 --- Comment #4 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:e6683450f4a26dae7774be735a3429f48aee9565 commit r12-906-ge6683450f4a26dae7774be735a3429f48aee9565 Author: Jakub Jelinek Date: Wed May 19 12:05:30 2021 +0200 builtins: Fix ICE with unprototyped builtin call [PR100576] For unprototyped builtins the checking we perform is only about whether the used argument is integral, pointer etc., not the exact precision. We emit a warning about the problem though: pr100576.c: In function =C3=A2foo=C3=A2: pr100576.c:9:11: warning: implicit declaration of function =C3=A2memcmp= =C3=A2 [-Wimplicit-function-declaration] 9 | int n =3D memcmp (p, v, b); | ^~~~~~ pr100576.c:1:1: note: include =C3=A2=C3=A2 or provide a decla= ration of =C3=A2memcmp=C3=A2 +++ |+#include 1 | /* PR middle-end/100576 */ pr100576.c:9:25: warning: =C3=A2memcmp=C3=A2 argument 3 type is =C3=A2i= nt=C3=A2 where =C3=A2long unsigned int=C3=A2 is expected in a call to built-in function de= clared without prototype +[-Wbuiltin-declaration-mismatch] 9 | int n =3D memcmp (p, v, b); | ^ It means in the testcase below where the user incorrectly called memcmp with last argument int rather then size_t, the warning stuff in builtin= s.c ICEs because it compares a wide_int from such a bound with another wide= _int which has precision of size_t/sizetype and wide_int asserts the compared wide_ints are compatible. Fixed by forcing the bound to have the right type. 2021-05-19 Jakub Jelinek PR middle-end/100576 * builtins.c (check_read_access): Convert bound to size_type_no= de if non-NULL. * gcc.c-torture/compile/pr100576.c: New test.=