]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c++: fix PR110102 backport
authorJason Merrill <jason@redhat.com>
Fri, 23 Jun 2023 17:15:32 +0000 (13:15 -0400)
committerJason Merrill <jason@redhat.com>
Fri, 23 Jun 2023 17:16:22 +0000 (13:16 -0400)
The argument for is_xible changed from list to vec in GCC 14.

gcc/cp/ChangeLog:

* call.cc (maybe_init_list_as_array): Build a list.

gcc/cp/call.cc

index 6dc925ecc5b9082bb158fba198f4b6f384ba7363..149ae766e00e3ca2e3c1371b3961c2d15ef9310c 100644 (file)
@@ -4273,9 +4273,8 @@ maybe_init_list_as_array (tree elttype, tree init)
 
   /* We can't do this if copying from the initializer_list would be
      ill-formed.  */
-  tree copy_argtypes = make_tree_vec (1);
-  TREE_VEC_ELT (copy_argtypes, 0)
-    = cp_build_qualified_type (elttype, TYPE_QUAL_CONST);
+  tree copy_argtypes = build_tree_list
+    (NULL_TREE, cp_build_qualified_type (elttype, TYPE_QUAL_CONST));
   if (!is_xible (INIT_EXPR, elttype, copy_argtypes))
     return NULL_TREE;