c++: __builtin_shufflevector with value-dep expr [PR105353]
Here we issue an error from c_build_shufflevector while parsing a template
because it got a TEMPLATE_PARM_INDEX, but this function expects INTEGER_CSTs
(except the first two arguments). It checks if any of the arguments are
type-dependent, if so, we leave the processing for later, but it should
also check value-dependency for the 3rd+ arguments, so as to avoid the
problem above.
This is not a regression -- __builtin_shufflevector was introduced in
GCC 12, but it looks safe enough.
PR c++/105353
gcc/cp/ChangeLog:
* typeck.cc (build_x_shufflevector): Use
instantiation_dependent_expression_p except for the first two
arguments.
gcc/testsuite/ChangeLog:
* g++.dg/ext/builtin-shufflevector-3.C: New test.