[PATCH] Mark DECL_SET_IS_OPERATOR_DELETE for user-provided delete operators.
Jason Merrill
jason@redhat.com
Thu Aug 1 16:16:00 GMT 2019
OK.
On 8/1/19 9:12 AM, Martin Liška wrote:
> Hi.
>
> As discussed with Marc, I'm suggesting to mark user-provided
> delete operators with DECL_SET_IS_OPERATOR_DELETE in order to allow
> possible DCE for it. I've checked that clang can also optimize that
> situation out.
>
> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
>
> Ready to be installed?
> Thanks,
> Martin
>
> gcc/cp/ChangeLog:
>
> 2019-07-30 Martin Liska <mliska@suse.cz>
>
> * decl.c (grok_op_properties):
> Mark DECL_SET_IS_OPERATOR_DELETE for user-provided delete operators.
>
> gcc/testsuite/ChangeLog:
>
> 2019-07-30 Martin Liska <mliska@suse.cz>
>
> * g++.dg/cpp1y/new2.C: New test.
> ---
> gcc/cp/decl.c | 5 +++-
> gcc/testsuite/g++.dg/cpp1y/new2.C | 39 +++++++++++++++++++++++++++++++
> 2 files changed, 43 insertions(+), 1 deletion(-)
> create mode 100644 gcc/testsuite/g++.dg/cpp1y/new2.C
>
>
More information about the Gcc-patches
mailing list