public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Richard Biener <rguenth@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-5398] c++/103326 - fix ICE in tsubst with VECTOR_CST Date: Fri, 19 Nov 2021 09:36:02 +0000 (GMT) [thread overview] Message-ID: <20211119093602.9F229385780F@sourceware.org> (raw) https://gcc.gnu.org/g:dd85c42c36a5d4e00b41ed40bca98598a2fb57c5 commit r12-5398-gdd85c42c36a5d4e00b41ed40bca98598a2fb57c5 Author: Richard Biener <rguenther@suse.de> Date: Fri Nov 19 08:54:18 2021 +0100 c++/103326 - fix ICE in tsubst with VECTOR_CST This adds missing handling of VECTOR_CST. 2021-11-19 Richard Biener <rguenther@suse.de> PR c++/103326 * pt.c (tsubst_copy): Handle VECTOR_CST. * g++.dg/pr103326.C: New testcase. Diff: --- gcc/cp/pt.c | 1 + gcc/testsuite/g++.dg/pr103326.C | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 6a2a9377648..22798b91608 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -17254,6 +17254,7 @@ tsubst_copy (tree t, tree args, tsubst_flags_t complain, tree in_decl) case INTEGER_CST: case REAL_CST: case COMPLEX_CST: + case VECTOR_CST: { /* Instantiate any typedefs in the type. */ tree type = tsubst (TREE_TYPE (t), args, complain, in_decl); diff --git a/gcc/testsuite/g++.dg/pr103326.C b/gcc/testsuite/g++.dg/pr103326.C new file mode 100644 index 00000000000..260e7da86e8 --- /dev/null +++ b/gcc/testsuite/g++.dg/pr103326.C @@ -0,0 +1,15 @@ +// { dg-do compile } +// { dg-require-effective-target c++11 } + +using x86_64_v16qi [[gnu::__vector_size__ (16)]] = char; + +template<typename T> +void foo() +{ + constexpr x86_64_v16qi zero{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; +} + +void foo2() +{ + foo<int>(); +}
reply other threads:[~2021-11-19 9:36 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=20211119093602.9F229385780F@sourceware.org \ --to=rguenth@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).