aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2021-01-13 05:13:12 -0800
committerNathan Sidwell <nathan@acm.org>2021-01-13 05:18:23 -0800
commit11cbea852b0ae2b0f17a9caeaf6344d689231c2f (patch)
tree2d1d4c21ed61c7a24060c4efbbc7bb2f87aa1823
parent264a1269b44ccd4e5c37307d49461dd4ff52457c (diff)
downloadgcc-11cbea852b0ae2b0f17a9caeaf6344d689231c2f.zip
gcc-11cbea852b0ae2b0f17a9caeaf6344d689231c2f.tar.gz
gcc-11cbea852b0ae2b0f17a9caeaf6344d689231c2f.tar.bz2
c++: Fix cp_build_function_call_vec [PR 98626]
I misunderstood the cp_build_function_call_vec API, thinking a NULL vector was an acceptable way of passing no arguments. You need to pass a vector of no elements. PR c++/98626 gcc/cp/ * module.cc (module_add_import_initializers): Pass a zero-element argument vector.
-rw-r--r--gcc/cp/module.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc
index d209391..1fd0bcf 100644
--- a/gcc/cp/module.cc
+++ b/gcc/cp/module.cc
@@ -18977,8 +18977,8 @@ module_add_import_initializers ()
if (modules)
{
tree fntype = build_function_type (void_type_node, void_list_node);
- vec<tree, va_gc> *args = NULL;
-
+ releasing_vec args; // There are no args
+
for (unsigned ix = modules->length (); --ix;)
{
module_state *import = (*modules)[ix];