diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2019-10-10 15:04:44 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2019-10-10 13:04:44 +0000 |
commit | 019f36a648fd3f35e562eb7ddd3ff6393b30b4c7 (patch) | |
tree | 3bccfeacaa19816afb231f29ac6f6a4f55cf7b36 | |
parent | 9142736ee21629b159504a474f686cabb1612579 (diff) | |
download | gcc-019f36a648fd3f35e562eb7ddd3ff6393b30b4c7.zip gcc-019f36a648fd3f35e562eb7ddd3ff6393b30b4c7.tar.gz gcc-019f36a648fd3f35e562eb7ddd3ff6393b30b4c7.tar.bz2 |
re PR middle-end/92037 (LTO bootstrap broken in selftests)
PR middle-end/92037
* cgraph.c (symbol_table_test::symbol_table_test): Use ggc_alloc
rather than ggc_alloc_cleared to alloc symbol table.
* toplev.c (general_init): Likewise.
* cgraph.h (symbol_table): Explicitly construct every field.
From-SVN: r276804
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/cgraph.c | 2 | ||||
-rw-r--r-- | gcc/cgraph.h | 22 | ||||
-rw-r--r-- | gcc/toplev.c | 2 |
4 files changed, 26 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2e34b80..e97db14 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2019-10-10 Jan Hubicka <hubicka@ucw.cz> + + PR middle-end/92037 + * cgraph.c (symbol_table_test::symbol_table_test): Use ggc_alloc + rather than ggc_alloc_cleared to alloc symbol table. + * toplev.c (general_init): Likewise. + * cgraph.h (symbol_table): Explicitly construct every field. + 2019-10-10 Andreas Krebbel <krebbel@linux.ibm.com> * common/config/s390/s390-common.c (PF_ARCH13): Rename to... diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 0c3c6e7..8b752d8 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -3835,7 +3835,7 @@ symbol_table_test::symbol_table_test () { gcc_assert (saved_symtab == NULL); saved_symtab = symtab; - symtab = new (ggc_cleared_alloc <symbol_table> ()) symbol_table (); + symtab = new (ggc_alloc <symbol_table> ()) symbol_table (); } /* Destructor. Restore the old value of symtab. */ diff --git a/gcc/cgraph.h b/gcc/cgraph.h index 73b2be6..733d616 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -2095,9 +2095,19 @@ public: friend struct cgraph_node; friend struct cgraph_edge; - symbol_table (): cgraph_max_uid (1), cgraph_max_summary_id (0), - edges_max_uid (1), edges_max_summary_id (0), - cgraph_released_summary_ids (), edge_released_summary_ids () + symbol_table (): + cgraph_count (0), cgraph_max_uid (1), cgraph_max_summary_id (0), + edges_count (0), edges_max_uid (1), edges_max_summary_id (0), + cgraph_released_summary_ids (), edge_released_summary_ids (), + nodes (NULL), asmnodes (NULL), asm_last_node (NULL), + order (0), global_info_ready (false), state (PARSING), + function_flags_ready (false), cpp_implicit_aliases_done (false), + section_hash (NULL), assembler_name_hash (NULL), init_priority_hash (NULL), + dump_file (NULL), ipa_clones_dump_file (NULL), cloned_nodes (), + m_first_edge_removal_hook (NULL), m_first_cgraph_removal_hook (NULL), + m_first_edge_duplicated_hook (NULL), m_first_cgraph_duplicated_hook (NULL), + m_first_cgraph_insertion_hook (NULL), m_first_varpool_insertion_hook (NULL), + m_first_varpool_removal_hook (NULL) { } @@ -2343,6 +2353,9 @@ public: /* Vector of released summary IDS for cgraph nodes. */ vec<int> GTY ((skip)) edge_released_summary_ids; + /* Return symbol used to separate symbol name from suffix. */ + static char symbol_suffix_separator (); + symtab_node* GTY(()) nodes; asm_node* GTY(()) asmnodes; asm_node* GTY(()) asm_last_node; @@ -2372,9 +2385,6 @@ public: FILE* GTY ((skip)) dump_file; - /* Return symbol used to separate symbol name from suffix. */ - static char symbol_suffix_separator (); - FILE* GTY ((skip)) ipa_clones_dump_file; hash_set <const cgraph_node *> GTY ((skip)) cloned_nodes; diff --git a/gcc/toplev.c b/gcc/toplev.c index d741a66..b85d52c 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1170,7 +1170,7 @@ general_init (const char *argv0, bool init_signals) /* Create the passes. */ g->set_passes (new gcc::pass_manager (g)); - symtab = new (ggc_cleared_alloc <symbol_table> ()) symbol_table (); + symtab = new (ggc_alloc <symbol_table> ()) symbol_table (); statistics_early_init (); debuginfo_early_init (); |