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/113574] wrong code with shift and _BitInt(1) at any opt level Date: Thu, 25 Jan 2024 12:16:05 +0000 [thread overview] Message-ID: <bug-113574-4-NqVzpNeGlB@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-113574-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113574 --- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:fb1b7e2fec951ba0bf4f68fac6a16929f4f63910 commit r14-8423-gfb1b7e2fec951ba0bf4f68fac6a16929f4f63910 Author: Jakub Jelinek <jakub@redhat.com> Date: Thu Jan 25 13:15:23 2024 +0100 convert: Fix test for out of bounds shift count [PR113574] The following patch is miscompiled, because convert_to_integer_1 for LSHIFT_EXPR tests if the INTEGER_CST shift count is too high, but incorrectly compares it against TYPE_SIZE rather than TYPE_PRECISION. The type in question is unsigned _BitInt(1), which has TYPE_PRECISION 1, TYPE_SIZE 8, and the shift count is 2 in that case. 2024-01-25 Jakub Jelinek <jakub@redhat.com> PR middle-end/113574 * convert.cc (convert_to_integer_1) <case LSHIFT_EXPR>: Compare shift count against TYPE_PRECISION rather than TYPE_SIZE. * gcc.dg/torture/bitint-52.c: New test.
next prev parent reply other threads:[~2024-01-25 12:16 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-01-24 5:36 [Bug tree-optimization/113574] New: " zsojka at seznam dot cz 2024-01-24 5:50 ` [Bug middle-end/113574] " pinskia at gcc dot gnu.org 2024-01-24 5:54 ` pinskia at gcc dot gnu.org 2024-01-24 6:52 ` pinskia at gcc dot gnu.org 2024-01-24 16:40 ` jakub at gcc dot gnu.org 2024-01-25 12:16 ` cvs-commit at gcc dot gnu.org [this message] 2024-01-25 12:16 ` 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-113574-4-NqVzpNeGlB@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).