]> gcc.gnu.org Git - gcc.git/commit
c++: Use fold_non_dependent_expr rather than maybe_constant_value in __builtin_shuffl...
authorJakub Jelinek <jakub@redhat.com>
Fri, 17 Jun 2022 15:40:49 +0000 (17:40 +0200)
committerJakub Jelinek <jakub@redhat.com>
Sun, 19 Jun 2022 10:08:35 +0000 (12:08 +0200)
commit566e599c8194f789b077eb94a5e45ced2de5b31e
tree6bfb9d87edd07a1a3289f8e5132a6096a1d69128
parent86e10e471fddfcacb0c02d02f30ab5bb2038e504
c++: Use fold_non_dependent_expr rather than maybe_constant_value in __builtin_shufflevector handling [PR106001]

In this case the STATIC_CAST_EXPR expressions in the call aren't
type nor value dependent, but maybe_constant_value still ICEs on those
when processing_template_decl.  Calling fold_non_dependent_expr on it
instead fixes the ICE and folds them to INTEGER_CSTs.

2022-06-17  Jakub Jelinek  <jakub@redhat.com>

PR c++/106001
* typeck.cc (build_x_shufflevector): Use fold_non_dependent_expr
instead of maybe_constant_value.

* g++.dg/ext/builtin-shufflevector-4.C: New test.

(cherry picked from commit a284fadcce8ef443cc3cc047a8017745efb51758)
gcc/cp/typeck.cc
gcc/testsuite/g++.dg/ext/builtin-shufflevector-4.C [new file with mode: 0644]
This page took 0.075348 seconds and 6 git commands to generate.