On Fri, Apr 22, 2022 at 07:57:34PM -0400, Marek Polacek via Gcc-patches wrote:
> 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.
> 
> Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk?
> 
>       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.

LGTM.

        Jakub

Reply via email to