public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/100576] [11 Regression] ICE at -O1 and above: in decompose, at wide-int.h:984 since r11-2928-gd14c547abd484d35 Date: Mon, 31 May 2021 14:08:40 +0000 [thread overview] Message-ID: <bug-100576-4-NSSvIT1BP5@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-100576-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100576 --- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:f4d6ea0c64bbbbe45add18294bfbd2ceb6512bbd commit r11-8489-gf4d6ea0c64bbbbe45add18294bfbd2ceb6512bbd Author: Jakub Jelinek <jakub@redhat.com> 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 âfooâ: pr100576.c:9:11: warning: implicit declaration of function âmemcmpâ [-Wimplicit-function-declaration] 9 | int n = memcmp (p, v, b); | ^~~~~~ pr100576.c:1:1: note: include â<string.h>â or provide a declaration of âmemcmpâ +++ |+#include <string.h> 1 | /* PR middle-end/100576 */ pr100576.c:9:25: warning: âmemcmpâ argument 3 type is âintâ where âlong unsigned intâ is expected in a call to built-in function declared without prototype +[-Wbuiltin-declaration-mismatch] 9 | int n = 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 builtins.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 <jakub@redhat.com> PR middle-end/100576 * builtins.c (check_read_access): Convert bound to size_type_node if non-NULL. * gcc.c-torture/compile/pr100576.c: New test. (cherry picked from commit e6683450f4a26dae7774be735a3429f48aee9565)
next prev parent reply other threads:[~2021-05-31 14:08 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-12 23:00 [Bug c/100576] New: ICE at -O1 and above: in decompose, at wide-int.h:984 cnsun at uwaterloo dot ca 2021-05-13 7:42 ` [Bug c/100576] [11/12 Regression] ICE at -O1 and above: in decompose, at wide-int.h:984 since r11-2928-gd14c547abd484d35 marxin at gcc dot gnu.org 2021-05-16 18:51 ` pinskia at gcc dot gnu.org 2021-05-17 11:36 ` [Bug middle-end/100576] " rguenth at gcc dot gnu.org 2021-05-17 18:02 ` jakub at gcc dot gnu.org 2021-05-17 18:16 ` jakub at gcc dot gnu.org 2021-05-19 10:06 ` cvs-commit at gcc dot gnu.org 2021-05-19 10:06 ` [Bug middle-end/100576] [11 " jakub at gcc dot gnu.org 2021-05-31 14:08 ` cvs-commit at gcc dot gnu.org [this message] 2021-05-31 14:57 ` jakub at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-100576-4-NSSvIT1BP5@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).