diff options
author | Martin Liska <mliska@suse.cz> | 2022-10-08 10:19:23 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2022-10-08 10:19:23 +0200 |
commit | d9e7934d25da4a78ffef1f738206aa1d897911df (patch) | |
tree | 1bd1697c14259e095f4b4790946eae7df0c5a2e3 /gcc/cp/module.cc | |
parent | da0970e441345f8349522ff1abac5c223044ebb1 (diff) | |
parent | 6ffbf87ca66f4ed9cd79cff675fabe2109e46e85 (diff) | |
download | gcc-d9e7934d25da4a78ffef1f738206aa1d897911df.zip gcc-d9e7934d25da4a78ffef1f738206aa1d897911df.tar.gz gcc-d9e7934d25da4a78ffef1f738206aa1d897911df.tar.bz2 |
Merge branch 'master' into devel/sphinx
Diffstat (limited to 'gcc/cp/module.cc')
-rw-r--r-- | gcc/cp/module.cc | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc index 500ac06..4d27ceb 100644 --- a/gcc/cp/module.cc +++ b/gcc/cp/module.cc @@ -3469,6 +3469,20 @@ enum streamed_extensions { SE_BITS = 1 }; +/* Counter indices. */ +enum module_state_counts +{ + MSC_sec_lwm, + MSC_sec_hwm, + MSC_pendings, + MSC_entities, + MSC_namespaces, + MSC_bindings, + MSC_macros, + MSC_inits, + MSC_HWM +}; + /********************************************************************/ struct module_state_config; @@ -3666,8 +3680,8 @@ class GTY((chain_next ("%h.parent"), for_user)) module_state { private: void write_config (elf_out *to, struct module_state_config &, unsigned crc); bool read_config (struct module_state_config &); - static void write_counts (elf_out *to, unsigned [], unsigned *crc_ptr); - bool read_counts (unsigned []); + static void write_counts (elf_out *to, unsigned [MSC_HWM], unsigned *crc_ptr); + bool read_counts (unsigned *); public: void note_cmi_name (); @@ -5397,6 +5411,9 @@ trees_out::core_bools (tree t) case VAR_DECL: if (TREE_PUBLIC (t) + && !(TREE_STATIC (t) + && DECL_FUNCTION_SCOPE_P (t) + && DECL_DECLARED_INLINE_P (DECL_CONTEXT (t))) && !DECL_VAR_DECLARED_INLINE_P (t)) is_external = true; break; @@ -5416,6 +5433,7 @@ trees_out::core_bools (tree t) WB (t->decl_common.decl_by_reference_flag); WB (t->decl_common.decl_read_flag); WB (t->decl_common.decl_nonshareable_flag); + WB (t->decl_common.decl_not_flexarray); } if (CODE_CONTAINS_STRUCT (code, TS_DECL_WITH_VIS)) @@ -5560,6 +5578,7 @@ trees_in::core_bools (tree t) RB (t->decl_common.decl_by_reference_flag); RB (t->decl_common.decl_read_flag); RB (t->decl_common.decl_nonshareable_flag); + RB (t->decl_common.decl_not_flexarray); } if (CODE_CONTAINS_STRUCT (code, TS_DECL_WITH_VIS)) @@ -11902,7 +11921,11 @@ trees_out::mark_class_def (tree defn) mark_class_member (member); if (TREE_CODE (member) == FIELD_DECL) if (tree repr = DECL_BIT_FIELD_REPRESENTATIVE (member)) - mark_declaration (repr, false); + /* If we're marking a class template definition, then + this'll contain the width (as set by grokbitfield) + instead of a decl. */ + if (DECL_P (repr)) + mark_declaration (repr, false); } /* Mark the binfo hierarchy. */ @@ -14541,20 +14564,6 @@ module_state::read_partitions (unsigned count) return true; } -/* Counter indices. */ -enum module_state_counts -{ - MSC_sec_lwm, - MSC_sec_hwm, - MSC_pendings, - MSC_entities, - MSC_namespaces, - MSC_bindings, - MSC_macros, - MSC_inits, - MSC_HWM -}; - /* Data for config reading and writing. */ struct module_state_config { const char *dialect_str; |