diff options
author | Iain Sandoe <iain@sandoe.co.uk> | 2020-04-22 09:49:20 +0100 |
---|---|---|
committer | Iain Sandoe <iain@sandoe.co.uk> | 2020-04-22 09:49:20 +0100 |
commit | 38644f81babd04820daa9d622ea75eb68c066c86 (patch) | |
tree | 61495547ef6245a0200874f9d3cfec0ee10d0268 /gcc/fortran/scanner.c | |
parent | 9ad3c1d81c129fc76594b9df5b798c380cbf03ee (diff) | |
download | gcc-38644f81babd04820daa9d622ea75eb68c066c86.zip gcc-38644f81babd04820daa9d622ea75eb68c066c86.tar.gz gcc-38644f81babd04820daa9d622ea75eb68c066c86.tar.bz2 |
coroutines: Pass class reference to promise param preview [PR94682]
As reported in the PR, per [dcl.fct.def.coroutine]/4 we should
be passing a reference to the object to the promise parameter
preview, and we are currently passing a pointer (this). Amend to
pass the reference.
gcc/cp/ChangeLog:
2020-04-22 Iain Sandoe <iain@sandoe.co.uk>
PR c++/94682
* coroutines.cc (struct param_info): Add a field to note that
the param is 'this'.
(morph_fn_to_coro): Convert this to a reference before using it
in the promise parameter preview.
gcc/testsuite/ChangeLog:
2020-04-22 Iain Sandoe <iain@sandoe.co.uk>
PR c++/94682
* g++.dg/coroutines/pr94682-preview-this.C: New test.
Diffstat (limited to 'gcc/fortran/scanner.c')
0 files changed, 0 insertions, 0 deletions