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

--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
My fix is just

--- a/gcc/cp/typeck.cc
+++ b/gcc/cp/typeck.cc
@@ -6315,7 +6315,7 @@ build_x_shufflevector (location_t loc, vec<tree, va_gc>
*args,
   if (processing_template_decl)
     {
       for (unsigned i = 0; i < args->length (); ++i)
-   if (type_dependent_expression_p ((*args)[i]))
+   if (instantiation_dependent_expression_p ((*args)[i]))
      {
        tree exp = build_min_nt_call_vec (NULL, args);
        CALL_EXPR_IFN (exp) = IFN_SHUFFLEVECTOR;


so what we leave the IFN_SHUFFLEVECTOR to be processed when instantiating. 
fold_non_dependent_expr wouldn't know what to substitute T with yet.

Reply via email to