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 target/104482] ICE: Segmentation fault (in rs6000_builtin_type_compatible), or ICE: tree check: expected class 'type', have 'reference' (attr_addr_expr) in cp_type_quals, at cp/typeck.cc:10955 Date: Wed, 21 Sep 2022 05:07:43 +0000 [thread overview] Message-ID: <bug-104482-4-8yqk1Pn8RS@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-104482-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104482 --- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-12 branch has been updated by Kewen Lin <linkw@gcc.gnu.org>: https://gcc.gnu.org/g:1a71881d05d3ec3e56492fff0197f88dcf4d9dbc commit r12-8778-g1a71881d05d3ec3e56492fff0197f88dcf4d9dbc Author: Kewen Lin <linkw@linux.ibm.com> Date: Tue Sep 13 04:14:23 2022 -0500 rs6000: Fix the check of bif argument number [PR104482] As PR104482 shown, it's one regression about the handlings when the argument number is more than the one of built-in function prototype. The new bif support only catches the case that the argument number is less than the one of function prototype, but it misses the case that the argument number is more than the one of function prototype. Because it uses "n != expected_args", n is updated in for (n = 0; !VOID_TYPE_P (TREE_VALUE (fnargs)) && n < nargs; fnargs = TREE_CHAIN (fnargs), n++) , it's restricted to be less than or equal to expected_args with the guard !VOID_TYPE_P (TREE_VALUE (fnargs)), so it's wrong. The fix is to use nargs instead, also move the checking hunk's location ahead to avoid useless further scanning when the counts mismatch. PR target/104482 gcc/ChangeLog: * config/rs6000/rs6000-c.cc (altivec_resolve_overloaded_builtin): Fix the equality check for argument number, and move this hunk ahead. gcc/testsuite/ChangeLog: * gcc.target/powerpc/pr104482.c: New test. (cherry picked from commit 38db48346cc045ed5656233c42d01d6d06bffc35)
next prev parent reply other threads:[~2022-09-21 5:07 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-02-10 8:34 [Bug target/104482] New: " asolokha at gmx dot com 2022-03-08 9:01 ` [Bug target/104482] " linkw at gcc dot gnu.org 2022-03-15 11:39 ` linkw at gcc dot gnu.org 2022-04-14 3:22 ` linkw at gcc dot gnu.org 2022-05-24 6:32 ` linkw at gcc dot gnu.org 2022-09-13 10:40 ` cvs-commit at gcc dot gnu.org 2022-09-21 5:07 ` cvs-commit at gcc dot gnu.org [this message] 2022-09-21 5:10 ` linkw 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-104482-4-8yqk1Pn8RS@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).