From 23f69ab02e4e5c433e32cfae306530059ccdda38 Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Sun, 2 Jun 2019 20:05:37 +0000 Subject: [PATCH] c++-coroutines - verify trees in the actor, NFC. 2019-06-02 Iain Sandoe gcc/cp/ * coroutines.cc (build_actor_fn): Verify trees before and after. From-SVN: r271846 --- ChangeLog.coroutines | 5 +++++ gcc/cp/coroutines.cc | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog.coroutines b/ChangeLog.coroutines index e68072f2cce7..09d5dd8c6e44 100644 --- a/ChangeLog.coroutines +++ b/ChangeLog.coroutines @@ -1,3 +1,8 @@ +2019-06-02 Iain Sandoe + + gcc/cp/ + * coroutines.cc (build_actor_fn): Verify trees before and after. + 2019-06-02 Iain Sandoe gcc/cp/ diff --git a/gcc/cp/coroutines.cc b/gcc/cp/coroutines.cc index 533c402643a5..62a166599c8b 100644 --- a/gcc/cp/coroutines.cc +++ b/gcc/cp/coroutines.cc @@ -1152,6 +1152,7 @@ build_actor_fn (location_t loc, tree coro_frame_type, tree actor, tree fnbody, tree orig, tree initial_await, tree final_await, unsigned body_count) { + verify_stmt_tree (fnbody); /* Some things we inherit from the original function. */ tree coro_frame_ptr = build_pointer_type (coro_frame_type); tree handle_type = DECL_COROUTINE_HANDLE_TYPE (orig); @@ -1453,6 +1454,7 @@ build_actor_fn (location_t loc, tree coro_frame_type, tree actor, finish_compound_stmt (stmt); DECL_SAVED_TREE (actor) = pop_stmt_list (actor_outer); + verify_stmt_tree (DECL_SAVED_TREE (actor)); } /* The prototype 'destroy' function :