https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105353

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Marek Polacek <mpola...@gcc.gnu.org>:

https://gcc.gnu.org/g:1ba397e9f93d3abc93a6ecbabc3d873489a6fb7f

commit r12-8248-g1ba397e9f93d3abc93a6ecbabc3d873489a6fb7f
Author: Marek Polacek <pola...@redhat.com>
Date:   Fri Apr 22 19:40:27 2022 -0400

    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.
  • [Bug c++/105353] __builtin_shuf... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to