coroutines: Copy attributes to the outlined functions [PR95518,PR95813]
authorIain Sandoe <iain@sandoe.co.uk>
Wed, 24 Jun 2020 17:48:33 +0000 (18:48 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Wed, 24 Jun 2020 20:05:37 +0000 (21:05 +0100)
commit1e5da6a02fec8aa84bb00966282f420cb70fe4f0
tree01477813c8a08e8118524130158da7d3619c2817
parent2dbc16552204ffa28b643949eb1f26b787017b39
coroutines: Copy attributes to the outlined functions [PR95518,PR95813]

We had omitted the copying of function attributes, we now copy
the used, alignment, section values from the original decal and
the complete set of function attributes.  It is likely that
some function attributes don't really make sense for coroutines,
but that can be disgnosed separately. Also mark the outlined
functions as artificial, since they are; some diagnostic
processing tests this.

gcc/cp/ChangeLog:

PR c++/95518
PR c++/95813
* coroutines.cc (act_des_fn): Copy function
attributes onto the outlined coroutine helpers.

gcc/testsuite/ChangeLog:

PR c++/95518
PR c++/95813
* g++.dg/coroutines/pr95518.C: New test.
* g++.dg/coroutines/pr95813.C: New test.
gcc/cp/coroutines.cc
gcc/testsuite/g++.dg/coroutines/pr95518.C [new file with mode: 0644]
gcc/testsuite/g++.dg/coroutines/pr95813.C [new file with mode: 0644]