From 3c5b0ca4c5d8aa8a0f13a4e57b4f9cf4a9de48cb Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Mon, 24 Apr 2017 07:33:20 +0000 Subject: [PATCH] =?utf8?q?re=20PR=20bootstrap/79814=20(pass-instances.def:?= =?utf8?q?36:14:=20error:=20=E2=80=98*.gcc::pass=5Fmanager::pass?= =?utf8?q?=5Fwarn=5Funused=5Fresult=5F1=E2=80=99=20is=20used=20uninitializ?= =?utf8?q?ed=20in=20this=20function)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 2017-04-24 Richard Biener PR bootstrap/79814 * pass_manager.h (pass_manager::operator new): Remove. (pass_manager::operator delete): Likewise. * passes.c (pass_manager::operator new): Remove. (pass_manager::operator delete): Likewise. (pass_manager::pass_manager): Zero individual pass members. From-SVN: r247089 --- gcc/ChangeLog | 9 +++++++++ gcc/pass_manager.h | 3 --- gcc/passes.c | 28 +++++++++++++++------------- 3 files changed, 24 insertions(+), 16 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 416cc177903..2f3a3985415 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2017-04-24 Richard Biener + + PR bootstrap/79814 + * pass_manager.h (pass_manager::operator new): Remove. + (pass_manager::operator delete): Likewise. + * passes.c (pass_manager::operator new): Remove. + (pass_manager::operator delete): Likewise. + (pass_manager::pass_manager): Zero individual pass members. + 2017-04-23 Uros Bizjak PR target/70799 diff --git a/gcc/pass_manager.h b/gcc/pass_manager.h index ae97cd411e2..cd8c2aaae44 100644 --- a/gcc/pass_manager.h +++ b/gcc/pass_manager.h @@ -47,9 +47,6 @@ class context; class pass_manager { public: - void *operator new (size_t sz); - void operator delete (void *ptr); - pass_manager (context *ctxt); ~pass_manager (); diff --git a/gcc/passes.c b/gcc/passes.c index 587c3be58c7..162cf8b82b2 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -1528,19 +1528,6 @@ pass_manager::register_pass (struct register_pass_info *pass_info) -> all_passes */ -void * -pass_manager::operator new (size_t sz) -{ - /* Ensure that all fields of the pass manager are zero-initialized. */ - return xcalloc (1, sz); -} - -void -pass_manager::operator delete (void *ptr) -{ - free (ptr); -} - pass_manager::pass_manager (context *ctxt) : all_passes (NULL), all_small_ipa_passes (NULL), all_lowering_passes (NULL), all_regular_ipa_passes (NULL), @@ -1549,6 +1536,21 @@ pass_manager::pass_manager (context *ctxt) { opt_pass **p; + /* Zero-initialize pass members. */ +#define INSERT_PASSES_AFTER(PASS) +#define PUSH_INSERT_PASSES_WITHIN(PASS) +#define POP_INSERT_PASSES() +#define NEXT_PASS(PASS, NUM) PASS ## _ ## NUM = NULL +#define NEXT_PASS_WITH_ARG(PASS, NUM, ARG) NEXT_PASS (PASS, NUM) +#define TERMINATE_PASS_LIST(PASS) +#include "pass-instances.def" +#undef INSERT_PASSES_AFTER +#undef PUSH_INSERT_PASSES_WITHIN +#undef POP_INSERT_PASSES +#undef NEXT_PASS +#undef NEXT_PASS_WITH_ARG +#undef TERMINATE_PASS_LIST + /* Initialize the pass_lists array. */ #define DEF_PASS_LIST(LIST) pass_lists[PASS_LIST_NO_##LIST] = &LIST; GCC_PASS_LISTS -- 2.30.2