[pushed] coroutines: init struct members to NULL

Message ID 3c8f6cc3-0c1e-8338-1cd9-5b4c61513252@suse.cz
State New
Headers show
Series
  • [pushed] coroutines: init struct members to NULL
Related show

Commit Message

Martin Liška March 18, 2021, 9:43 a.m.
Hello.

The patch is about a missing struct initialization. It's pre-approved by Iain.

Thanks,
Martin

gcc/cp/ChangeLog:

	PR c++/99617
	* coroutines.cc (struct var_nest_node): Init then_cl and else_cl
	to NULL.
---
  gcc/cp/coroutines.cc | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.30.2

Patch

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;