This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Mark DECL_SET_IS_OPERATOR_DELETE for user-provided delete operators.


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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]