public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Alex Coplan <acoplan@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/vendors/ARM/heads/morello)] cp: Allow INTCAP_TYPEs as non-type template parameters Date: Tue, 4 Oct 2022 10:03:33 +0000 (GMT) [thread overview] Message-ID: <20221004100333.51A91385841F@sourceware.org> (raw) https://gcc.gnu.org/g:ee3f16b654780d3333e1b94bb373dc134ab782c3 commit ee3f16b654780d3333e1b94bb373dc134ab782c3 Author: Alex Coplan <alex.coplan@arm.com> Date: Mon Sep 26 11:09:24 2022 +0100 cp: Allow INTCAP_TYPEs as non-type template parameters It looks like we missed updating pt.c:invalid_nontype_parm_type_p to allow INTCAP_TYPEs as non-type template parameters, this fixes that. gcc/cp/ChangeLog: * pt.c (invalid_nontype_parm_type_p): Also allow INTCAP_TYPEs. gcc/testsuite/ChangeLog: * g++.target/aarch64/morello/intcap-nontype-template.C: New test. Diff: --- gcc/cp/pt.c | 2 ++ gcc/testsuite/g++.target/aarch64/morello/intcap-nontype-template.C | 3 +++ 2 files changed, 5 insertions(+) diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 3b1d4816659..9957c11034f 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -26222,6 +26222,8 @@ invalid_nontype_parm_type_p (tree type, tsubst_flags_t complain) { if (INTEGRAL_OR_ENUMERATION_TYPE_P (type)) return false; + else if (INTCAP_TYPE_P (type)) + return false; else if (TYPE_PTR_P (type)) return false; else if (TYPE_REF_P (type) diff --git a/gcc/testsuite/g++.target/aarch64/morello/intcap-nontype-template.C b/gcc/testsuite/g++.target/aarch64/morello/intcap-nontype-template.C new file mode 100644 index 00000000000..02731c6c7a6 --- /dev/null +++ b/gcc/testsuite/g++.target/aarch64/morello/intcap-nontype-template.C @@ -0,0 +1,3 @@ +/* { dg-do compile } */ +template<__intcap v> +void f() {}
reply other threads:[~2022-10-04 10:03 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=20221004100333.51A91385841F@sourceware.org \ --to=acoplan@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).