diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-09 02:30:30 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-09 02:30:30 +0000 |
commit | 71e19e54060804493e13748613077b0e69c0cfd9 (patch) | |
tree | 13c6fa7658c6ac240d9a498d43c0bed9ba277176 /gcc/cp | |
parent | a6a6b11c6db09f567a5cca179407b89a9f603fc3 (diff) | |
download | gcc-71e19e54060804493e13748613077b0e69c0cfd9.tar.gz |
* symtab.c (dump_symtab_base): Update dumping.
(symtab_make_decl_local): Clear only DECL_COMDAT.
* tree-vect-data-refs.c (Check that variable is static before
tampering with sections.
* cgraphclones.c (duplicate_thunk_for_node): Do not clear section name.
(cgraph_create_virtual_clone): Likewise.
* tree.c (decl_comdat_group, decl_comdat_group_id): Constify argument.
(decl_section_name, set_decl_section_name): New accessors.
(find_decls_types_r): Do not walk section name
* tree.h (DECL_SECTION_NAME): Implement using
decl_section_name.
(decl_comdat_group, decl_comdat_group_id): Constify.
(decl_section_name, set_decl_section_name): Update.
* varpool.c (varpool_finalize_named_section_flags): Use
get_section.
* cgraph.c (cgraph_add_thunk): Reset node instead of rebuilding.
(cgraph_make_node_local_1): Clear section and comdat group.
* cgraph.h (set_comdat_group): Sanity check.
(get_section, set_section): New.
* ipa-comdats.c (ipa_comdats): Use get_section.
* ipa.c (ipa_discover_readonly_nonaddressable_var): Likewise.
* lto-streamer-out.c: Do not follow section names.
* c-family/c-common.c (handle_section_attribute):
Update.
* lto-cgraph.c (lto_output_node): Output section.
(lto_output_varpool_node): Likewise.
(read_comdat_group): Rename to ...
(read_identifier): ... this one.
(read_string_cst): New function.
(input_node, input_varpool_node): Input section names.
* tree-emutls.c (get_emutls_init_templ_addr): Update.
(new_emutls_decl): Update.
(secname_for_decl): Check section names only of static
vars.
* config/mep/mep.c (mep_unique_section): Use set_decl_section_name.
* config/i386/winnt.c (i386_pe_unique_section): Likewise.
* config/i386/i386.c (x86_64_elf_unique_section): Likewise.
* config/c6x/c6x.c (c6x_elf_unique_section): Likewise.
* config/rs6000/rs6000.c (rs6000_xcoff_unique_section): Likewise.
* config/mcore/mcore.c (mcore_unique_section): Likewise.
* config/mips/mips.c (mips16_build_function_stub): Likewise.
* config/v850/v850.c (v850_insert_attributes): Likewise.
* config/h8300/h8300.c: (h8300_handle_eightbit_data_attribute):
Likewise.
(h8300_handle_tiny_data_attribute): Likewise.
* config/bfin/bfin.c (bfin_handle_l1_text_attribute): Likewise.
(bfin_handle_l2_attribute): Likewise.
* tree-streamer-in.c (lto_input_ts_decl_with_vis_tree_pointers): Do not read section name.
* lto.c (mentions_vars_p_decl_with_vis, compare_tree_sccs_1,
lto_fixup_prevailing_decls): Skip section names.
* go-gcc.cc (global_variable_set_init): Use
set_decl_section_name.
* gcc-interface/utils.c (process_attributes): Use it.
* c-decl.c (merge_decls): Use set_decl_section_name.
(duplicate_decls): Remove node if it exists.
* class.c (build_utf8_ref): Use set_decl_section_name.
(emit_register_classes_in_jcr_section): Likewise.
(emit_register_classes_in_jcr_section): Likewise.
* method.c (use_thunk): Use set_decl_section_name.
* optimize.c (maybe_clone_body): Use set_decl_section_name.
* decl.c (duplicate_decls): Likewise.
* vtable-class-hierarchy.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211363 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/cp/decl.c | 6 | ||||
-rw-r--r-- | gcc/cp/method.c | 2 | ||||
-rw-r--r-- | gcc/cp/optimize.c | 2 | ||||
-rw-r--r-- | gcc/cp/vtable-class-hierarchy.c | 4 |
5 files changed, 15 insertions, 6 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 54c7948bb88..38a348cb997 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2014-06-07 Jan Hubicka <hubicka@ucw.cz> + + * method.c (use_thunk): Use set_decl_section_name. + * optimize.c (maybe_clone_body): Use set_decl_section_name. + * decl.c (duplicate_decls): Likewise. + * vtable-class-hierarchy.c: Likewise. + 2014-06-06 Paolo Carlini <paolo.carlini@oracle.com> PR c++/60184 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index b4d26b7af51..13b5d0b3431 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -2019,8 +2019,10 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) We want to issue an error if the sections conflict but that must be done later in decl_attributes since we are called before attributes are assigned. */ - if (DECL_SECTION_NAME (newdecl) == NULL_TREE) - DECL_SECTION_NAME (newdecl) = DECL_SECTION_NAME (olddecl); + if ((DECL_EXTERNAL (olddecl) || TREE_PUBLIC (olddecl) || TREE_STATIC (olddecl)) + && DECL_SECTION_NAME (newdecl) == NULL_TREE + && DECL_SECTION_NAME (olddecl) != NULL_TREE) + set_decl_section_name (newdecl, DECL_SECTION_NAME (olddecl)); if (TREE_CODE (newdecl) == FUNCTION_DECL) { diff --git a/gcc/cp/method.c b/gcc/cp/method.c index f8fc01ff531..0ae190ab52d 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -363,7 +363,7 @@ use_thunk (tree thunk_fndecl, bool emit_p) resolve_unique_section (thunk_fndecl, 0, flag_function_sections); /* Output the thunk into the same section as function. */ - DECL_SECTION_NAME (thunk_fndecl) = DECL_SECTION_NAME (function); + set_decl_section_name (thunk_fndecl, DECL_SECTION_NAME (function)); } } diff --git a/gcc/cp/optimize.c b/gcc/cp/optimize.c index 3f89b8197a2..ffa5258cba6 100644 --- a/gcc/cp/optimize.c +++ b/gcc/cp/optimize.c @@ -476,7 +476,6 @@ maybe_clone_body (tree fn) to it. By doing so, it also corrupted the comdat group. */ if (DECL_ONE_ONLY (fn)) cgraph_get_create_node (clone)->set_comdat_group (cxx_comdat_group (clone)); - DECL_SECTION_NAME (clone) = DECL_SECTION_NAME (fn); DECL_USE_TEMPLATE (clone) = DECL_USE_TEMPLATE (fn); DECL_EXTERNAL (clone) = DECL_EXTERNAL (fn); DECL_INTERFACE_KNOWN (clone) = DECL_INTERFACE_KNOWN (fn); @@ -487,6 +486,7 @@ maybe_clone_body (tree fn) DECL_DLLIMPORT_P (clone) = DECL_DLLIMPORT_P (fn); DECL_ATTRIBUTES (clone) = copy_list (DECL_ATTRIBUTES (fn)); DECL_DISREGARD_INLINE_LIMITS (clone) = DECL_DISREGARD_INLINE_LIMITS (fn); + set_decl_section_name (clone, DECL_SECTION_NAME (fn)); /* Adjust the parameter names and locations. */ parm = DECL_ARGUMENTS (fn); diff --git a/gcc/cp/vtable-class-hierarchy.c b/gcc/cp/vtable-class-hierarchy.c index 6da17c73134..3963d733805 100644 --- a/gcc/cp/vtable-class-hierarchy.c +++ b/gcc/cp/vtable-class-hierarchy.c @@ -1247,8 +1247,8 @@ vtable_find_or_create_map_decl (tree base_type) /* Put these mmap variables in thr .vtable_map_vars section, so we can find and protect them. */ - DECL_SECTION_NAME (var_decl) = build_string (strlen (".vtable_map_vars"), - ".vtable_map_vars"); + set_decl_section_name (var_decl, build_string (strlen (".vtable_map_vars"), + ".vtable_map_vars")); DECL_HAS_IMPLICIT_SECTION_NAME_P (var_decl) = true; DECL_INITIAL (var_decl) = initial_value; |