public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Kewen Lin <linkw@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-7792] rs6000: Skip overload instances with NULL fntype [PR104967] Date: Thu, 24 Mar 2022 01:47:57 +0000 (GMT) [thread overview] Message-ID: <20220324014757.51D963858C2C@sourceware.org> (raw) https://gcc.gnu.org/g:497bde3ab92b2c292f78672db341bbb7cc1bcf1f commit r12-7792-g497bde3ab92b2c292f78672db341bbb7cc1bcf1f Author: Kewen Lin <linkw@linux.ibm.com> Date: Wed Mar 23 20:46:06 2022 -0500 rs6000: Skip overload instances with NULL fntype [PR104967] For some overload built-in function instance, if it requires a data type which isn't defined on the target, its fntype would be initialized as NULL. This patch is to consider this possibility in function find_instance, as shown in PR104967. PR target/104967 gcc/ChangeLog: * config/rs6000/rs6000-c.cc (find_instance): Skip instances with null function types. Diff: --- gcc/config/rs6000/rs6000-c.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/config/rs6000/rs6000-c.cc b/gcc/config/rs6000/rs6000-c.cc index 2f0f4fe337d..84bb98f94fb 100644 --- a/gcc/config/rs6000/rs6000-c.cc +++ b/gcc/config/rs6000/rs6000-c.cc @@ -1686,6 +1686,10 @@ find_instance (bool *unsupported_builtin, ovlddata **instance, ovlddata *inst = *instance; gcc_assert (inst != NULL); + /* It is possible for an instance to require a data type that isn't + defined on this target, in which case inst->fntype will be NULL. */ + if (!inst->fntype) + return error_mark_node; tree fntype = rs6000_builtin_info[inst->bifid].fntype; tree parmtype0 = TREE_VALUE (TYPE_ARG_TYPES (fntype)); tree parmtype1 = TREE_VALUE (TREE_CHAIN (TYPE_ARG_TYPES (fntype)));
reply other threads:[~2022-03-24 1:47 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220324014757.51D963858C2C@sourceware.org \ --to=linkw@gcc.gnu.org \ --cc=gcc-cvs@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).