aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2020-05-01 19:20:46 +0100
committerIain Sandoe <iain@sandoe.co.uk>2020-05-04 20:53:14 +0100
commit0719055a956d900f160e2e980eb2a5c8bcc7cb39 (patch)
tree68f639d5fd4ffabe2a7afa0fccc6f46a900dd3ae /gcc
parent39439763714d668ac8b63fa6c93574ec151c4bb1 (diff)
downloadgcc-0719055a956d900f160e2e980eb2a5c8bcc7cb39.zip
gcc-0719055a956d900f160e2e980eb2a5c8bcc7cb39.tar.gz
gcc-0719055a956d900f160e2e980eb2a5c8bcc7cb39.tar.bz2
coroutines: Mark the gro as artificial.
This corrects an oversight, the coro.gro object is a a compiler-generated entity and should be marked as artificial and ignored. gcc/cp/ChangeLog: 2020-05-04 Iain Sandoe <iain@sandoe.co.uk> * coroutines.cc (morph_fn_to_coro): Mark the coro.gro variable as artificial and ignored.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/coroutines.cc2
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 334899d..70f620f 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2020-05-04 Iain Sandoe <iain@sandoe.co.uk>
+
+ * coroutines.cc (morph_fn_to_coro): Mark the coro.gro variable
+ as artificial and ignored.
+
2020-05-04 Nathan Sidwell <nathan@acm.org>
pt.c (process_template_parm): Don't walk the template list twice,
diff --git a/gcc/cp/coroutines.cc b/gcc/cp/coroutines.cc
index e90d3d5..bc08b1d 100644
--- a/gcc/cp/coroutines.cc
+++ b/gcc/cp/coroutines.cc
@@ -4234,6 +4234,8 @@ morph_fn_to_coro (tree orig, tree *resumer, tree *destroyer)
gro = build_lang_decl (VAR_DECL, get_identifier ("coro.gro"),
TREE_TYPE (get_ro));
DECL_CONTEXT (gro) = current_scope ();
+ DECL_ARTIFICIAL (gro) = true;
+ DECL_IGNORED_P (gro) = true;
add_decl_expr (gro);
gro_bind_vars = gro;