[gcc(refs/users/marxin/heads/PR99617-init-var_nest_node)] coroutines: init struct members to NULL

Martin Liska marxin@gcc.gnu.org
Tue Mar 16 12:26:45 GMT 2021


https://gcc.gnu.org/g:5a6453c8c4055e8a82d7d3a069c208a68fc1bc41

commit 5a6453c8c4055e8a82d7d3a069c208a68fc1bc41
Author: Martin Liska <mliska@suse.cz>
Date:   Tue Mar 16 13:26:09 2021 +0100

    coroutines: init struct members to NULL
    
    gcc/cp/ChangeLog:
    
            PR c++/99617
            * coroutines.cc (struct var_nest_node): Init then_cl and else_cl
            to NULL.

Diff:
---
 gcc/cp/coroutines.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/cp/coroutines.cc b/gcc/cp/coroutines.cc
index 51984efe2fd..dbd703a67cc 100644
--- a/gcc/cp/coroutines.cc
+++ b/gcc/cp/coroutines.cc
@@ -2805,7 +2805,7 @@ struct var_nest_node
 {
   var_nest_node () = default;
   var_nest_node (tree v, tree i, var_nest_node *p, var_nest_node *n)
-    : var(v), init(i), prev(p), next(n)
+    : var(v), init(i), prev(p), next(n), then_cl (NULL), else_cl (NULL)
     {
       if (p)
 	p->next = this;


More information about the Gcc-cvs mailing list