aboutsummaryrefslogtreecommitdiff
path: root/gcc/passes.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2017-04-24 07:33:20 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2017-04-24 07:33:20 +0000
commit3c5b0ca4c5d8aa8a0f13a4e57b4f9cf4a9de48cb (patch)
tree6b1bd67514790dd11db261b2965b9ccad5c04acd /gcc/passes.c
parent6382992791e50ef8ca0989d19b84352fab00f8db (diff)
downloadgcc-3c5b0ca4c5d8aa8a0f13a4e57b4f9cf4a9de48cb.zip
gcc-3c5b0ca4c5d8aa8a0f13a4e57b4f9cf4a9de48cb.tar.gz
gcc-3c5b0ca4c5d8aa8a0f13a4e57b4f9cf4a9de48cb.tar.bz2
re PR bootstrap/79814 (pass-instances.def:36:14: error: ‘*<unknown>.gcc::pass_manager::pass_warn_unused_result_1’ is used uninitialized in this function)
2017-04-24 Richard Biener <rguenther@suse.de> 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
Diffstat (limited to 'gcc/passes.c')
-rw-r--r--gcc/passes.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/gcc/passes.c b/gcc/passes.c
index 587c3be..162cf8b 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