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.
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);
--- /dev/null
+// { 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>();
+}