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 c++/99062] [10 Regression] ICE in tree_to_uhwi, at tree.h:4579 Date: Mon, 29 Mar 2021 12:38:23 +0000 [thread overview] Message-ID: <bug-99062-4-VixHh6pIZh@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-99062-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99062 --- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Richard Biener <rguenth@gcc.gnu.org>: https://gcc.gnu.org/g:9d020d111fbeae228b20d75a8c832b214e561ab3 commit r10-9553-g9d020d111fbeae228b20d75a8c832b214e561ab3 Author: Marek Polacek <polacek@redhat.com> Date: Wed Feb 10 15:24:25 2021 -0500 c-family: ICE with assume_aligned attribute [PR99062] We ICE in handle_assume_aligned_attribute since r271338 which added @@ -2935,8 +2936,8 @@ handle_assume_aligned_attribute (tree *node, tree name, tree args, int, /* The misalignment specified by the second argument must be non-negative and less than the alignment. */ warning (OPT_Wattributes, - "%qE attribute argument %E is not in the range [0, %E)", - name, val, align); + "%qE attribute argument %E is not in the range [0, %wu]", + name, val, tree_to_uhwi (align) - 1); *no_add_attrs = true; return NULL_TREE; } because align is INT_MIN and tree_to_uhwi asserts tree_fits_uhwi_p -- which ALIGN does not and the prior tree_fits_shwi_p check is fine with it, as well as the integer_pow2p check. Since neither of the arguments to assume_aligned can be negative, I've hoisted the tree_int_cst_sgn check. And add the missing "argument" word to an existing warning. gcc/c-family/ChangeLog: PR c++/99062 * c-attribs.c (handle_assume_aligned_attribute): Check that the alignment argument is non-negative. Tweak a warning message. gcc/testsuite/ChangeLog: PR c++/99062 * gcc.dg/attr-assume_aligned-4.c: Adjust dg-warning. * g++.dg/ext/attr-assume-aligned.C: New test. (cherry picked from commit 30a4d95bf76b0a0fdb66ac0211589a4434c83af3)
next prev parent reply other threads:[~2021-03-29 12:38 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-02-10 17:06 [Bug c++/99062] New: [10/11 " gscfq@t-online.de 2021-02-10 18:40 ` [Bug c++/99062] " mpolacek at gcc dot gnu.org 2021-02-10 18:45 ` mpolacek at gcc dot gnu.org 2021-02-10 18:59 ` mpolacek at gcc dot gnu.org 2021-02-10 20:51 ` msebor at gcc dot gnu.org 2021-02-10 21:05 ` mpolacek at gcc dot gnu.org 2021-02-16 19:08 ` cvs-commit at gcc dot gnu.org 2021-02-16 19:08 ` [Bug c++/99062] [10 " mpolacek at gcc dot gnu.org 2021-03-29 12:38 ` cvs-commit at gcc dot gnu.org [this message] 2021-03-29 12:39 ` rguenth 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-99062-4-VixHh6pIZh@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).