diff options
author | Marek Polacek <polacek@redhat.com> | 2022-04-22 19:40:27 -0400 |
---|---|---|
committer | Marek Polacek <polacek@redhat.com> | 2022-04-25 11:15:51 -0400 |
commit | 1ba397e9f93d3abc93a6ecbabc3d873489a6fb7f (patch) | |
tree | e5bad1b6098fc5195d4ec9e3938a1d3c70f7a45c /gcc/fortran | |
parent | 235f88dbc3494c49e0f361a5a3f78491f72ff47c (diff) | |
download | gcc-1ba397e9f93d3abc93a6ecbabc3d873489a6fb7f.zip gcc-1ba397e9f93d3abc93a6ecbabc3d873489a6fb7f.tar.gz gcc-1ba397e9f93d3abc93a6ecbabc3d873489a6fb7f.tar.bz2 |
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.
Diffstat (limited to 'gcc/fortran')
0 files changed, 0 insertions, 0 deletions