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.
This commit is contained in:
parent
a84177aff7
commit
dd85c42c36
2 changed files with 16 additions and 0 deletions
|
@ -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);
|
||||
|
|
15
gcc/testsuite/g++.dg/pr103326.C
Normal file
15
gcc/testsuite/g++.dg/pr103326.C
Normal file
|
@ -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>();
|
||||
}
|
Loading…
Add table
Reference in a new issue