From 3d987775d5e4766c5c7a8199b584161b017f3252 Mon Sep 17 00:00:00 2001 From: John Marino Date: Wed, 22 Apr 2015 11:15:19 +0200 Subject: [PATCH] Update gcc-50 to SVN version 222321 (gcc-5-branch) This is equivalent to the GCC 5.1 release plus 1 commit that changes the version from 5.1.0 to 5.1.1 to reopen the release branch. Last Changed Date: 2015-04-22 12:45:39 +0200 (Wed, 22 Apr 2015) --- contrib/gcc-5.0/LAST_UPDATED | 4 +-- contrib/gcc-5.0/gcc/BASE-VER | 2 +- contrib/gcc-5.0/gcc/DATESTAMP | 2 +- contrib/gcc-5.0/gcc/c/c-parser.c | 4 +-- contrib/gcc-5.0/gcc/config/i386/i386.c | 17 ++++++++++++- contrib/gcc-5.0/gcc/cp/parser.c | 2 +- contrib/gcc-5.0/gcc/dwarf2out.c | 1 + contrib/gcc-5.0/gcc/output.h | 1 + contrib/gcc-5.0/gcc/varasm.c | 35 +++++++++++++++++--------- contrib/gcc-5.0/libitm/ChangeLog | 4 +++ 10 files changed, 52 insertions(+), 20 deletions(-) diff --git a/contrib/gcc-5.0/LAST_UPDATED b/contrib/gcc-5.0/LAST_UPDATED index 7fc42a2cd2..ba6f827132 100644 --- a/contrib/gcc-5.0/LAST_UPDATED +++ b/contrib/gcc-5.0/LAST_UPDATED @@ -1,2 +1,2 @@ -222168 -Last Changed Date: 2015-04-17 09:45:46 +0200 (Fri, 17 Apr 2015) +222321 +Last Changed Date: 2015-04-22 12:45:39 +0200 (Wed, 22 Apr 2015) diff --git a/contrib/gcc-5.0/gcc/BASE-VER b/contrib/gcc-5.0/gcc/BASE-VER index 6b244dcd69..ac14c3dfaa 100644 --- a/contrib/gcc-5.0/gcc/BASE-VER +++ b/contrib/gcc-5.0/gcc/BASE-VER @@ -1 +1 @@ -5.0.1 +5.1.1 diff --git a/contrib/gcc-5.0/gcc/DATESTAMP b/contrib/gcc-5.0/gcc/DATESTAMP index 4f5d8b3d3e..52aaf4ef71 100644 --- a/contrib/gcc-5.0/gcc/DATESTAMP +++ b/contrib/gcc-5.0/gcc/DATESTAMP @@ -1 +1 @@ -20150417 +20150422 diff --git a/contrib/gcc-5.0/gcc/c/c-parser.c b/contrib/gcc-5.0/gcc/c/c-parser.c index 024dbd2af8..f5e2ac2c21 100644 --- a/contrib/gcc-5.0/gcc/c/c-parser.c +++ b/contrib/gcc-5.0/gcc/c/c-parser.c @@ -12153,7 +12153,7 @@ c_parser_oacc_enter_exit_data (c_parser *parser, bool enter) return; } - stmt = enter ? make_node (OACC_ENTER_DATA) : make_node (OACC_EXIT_DATA);; + stmt = enter ? make_node (OACC_ENTER_DATA) : make_node (OACC_EXIT_DATA); TREE_TYPE (stmt) = void_type_node; if (enter) OACC_ENTER_DATA_CLAUSES (stmt) = clauses; @@ -13851,7 +13851,7 @@ c_parser_omp_target_update (location_t loc, c_parser *parser, && find_omp_clause (clauses, OMP_CLAUSE_FROM) == NULL_TREE) { error_at (loc, - "%<#pragma omp target update must contain at least one " + "%<#pragma omp target update%> must contain at least one " "% or % clauses"); return false; } diff --git a/contrib/gcc-5.0/gcc/config/i386/i386.c b/contrib/gcc-5.0/gcc/config/i386/i386.c index 110ec4adc6..d6c2de8198 100644 --- a/contrib/gcc-5.0/gcc/config/i386/i386.c +++ b/contrib/gcc-5.0/gcc/config/i386/i386.c @@ -51801,6 +51801,21 @@ ix86_initialize_bounds (tree var, tree lb, tree ub, tree *stmts) return 2; } +#if !TARGET_MACHO && !TARGET_DLLIMPORT_DECL_ATTRIBUTES +/* For i386, common symbol is local only for non-PIE binaries. For + x86-64, common symbol is local only for non-PIE binaries or linker + supports copy reloc in PIE binaries. */ + +static bool +ix86_binds_local_p (const_tree exp) +{ + return default_binds_local_p_3 (exp, flag_shlib != 0, true, true, + (!flag_pic + || (TARGET_64BIT + && HAVE_LD_PIE_COPYRELOC != 0))); +} +#endif + /* Initialize the GCC target structure. */ #undef TARGET_RETURN_IN_MEMORY #define TARGET_RETURN_IN_MEMORY ix86_return_in_memory @@ -51935,7 +51950,7 @@ ix86_initialize_bounds (tree var, tree lb, tree ub, tree *stmts) #define TARGET_BINDS_LOCAL_P darwin_binds_local_p #else #undef TARGET_BINDS_LOCAL_P -#define TARGET_BINDS_LOCAL_P default_binds_local_p_2 +#define TARGET_BINDS_LOCAL_P ix86_binds_local_p #endif #if TARGET_DLLIMPORT_DECL_ATTRIBUTES #undef TARGET_BINDS_LOCAL_P diff --git a/contrib/gcc-5.0/gcc/cp/parser.c b/contrib/gcc-5.0/gcc/cp/parser.c index 4d6b479b49..3664145479 100644 --- a/contrib/gcc-5.0/gcc/cp/parser.c +++ b/contrib/gcc-5.0/gcc/cp/parser.c @@ -31395,7 +31395,7 @@ cp_parser_omp_target_update (cp_parser *parser, cp_token *pragma_tok, && find_omp_clause (clauses, OMP_CLAUSE_FROM) == NULL_TREE) { error_at (pragma_tok->location, - "%<#pragma omp target update must contain at least one " + "%<#pragma omp target update%> must contain at least one " "% or % clauses"); return false; } diff --git a/contrib/gcc-5.0/gcc/dwarf2out.c b/contrib/gcc-5.0/gcc/dwarf2out.c index b34a3ed3d0..60d6e00e9f 100644 --- a/contrib/gcc-5.0/gcc/dwarf2out.c +++ b/contrib/gcc-5.0/gcc/dwarf2out.c @@ -3886,6 +3886,7 @@ add_AT_wide (dw_die_ref die, enum dwarf_attribute attr_kind, attr.dw_attr = attr_kind; attr.dw_attr_val.val_class = dw_val_class_wide_int; + attr.dw_attr_val.val_entry = NULL; attr.dw_attr_val.v.val_wide = ggc_alloc (); *attr.dw_attr_val.v.val_wide = w; add_dwarf_attr (die, &attr); diff --git a/contrib/gcc-5.0/gcc/output.h b/contrib/gcc-5.0/gcc/output.h index 53e47d03b3..81d2ad29a8 100644 --- a/contrib/gcc-5.0/gcc/output.h +++ b/contrib/gcc-5.0/gcc/output.h @@ -587,6 +587,7 @@ extern bool default_use_anchors_for_symbol_p (const_rtx); extern bool default_binds_local_p (const_tree); extern bool default_binds_local_p_1 (const_tree, int); extern bool default_binds_local_p_2 (const_tree); +extern bool default_binds_local_p_3 (const_tree, bool, bool, bool, bool); extern void default_globalize_label (FILE *, const char *); extern void default_globalize_decl_name (FILE *, tree); extern void default_emit_unwind_label (FILE *, tree, int, int); diff --git a/contrib/gcc-5.0/gcc/varasm.c b/contrib/gcc-5.0/gcc/varasm.c index e644b1daa7..e8d996cb1e 100644 --- a/contrib/gcc-5.0/gcc/varasm.c +++ b/contrib/gcc-5.0/gcc/varasm.c @@ -6809,9 +6809,13 @@ resolution_local_p (enum ld_plugin_symbol_resolution resolution) || resolution == LDPR_RESOLVED_EXEC); } -static bool +/* COMMON_LOCAL_P is true means that the linker can guarantee that an + uninitialized common symbol in the executable will still be defined + (through COPY relocation) in the executable. */ + +bool default_binds_local_p_3 (const_tree exp, bool shlib, bool weak_dominate, - bool extern_protected_data) + bool extern_protected_data, bool common_local_p) { /* A non-decl is an entry in the constant pool. */ if (!DECL_P (exp)) @@ -6836,7 +6840,16 @@ default_binds_local_p_3 (const_tree exp, bool shlib, bool weak_dominate, because dynamic linking might overwrite symbols in shared libraries. */ bool resolved_locally = false; - bool defined_locally = !DECL_EXTERNAL (exp); + + bool uninited_common = (DECL_COMMON (exp) + && (DECL_INITIAL (exp) == NULL + || (!in_lto_p + && DECL_INITIAL (exp) == error_mark_node))); + + /* A non-external variable is defined locally only if it isn't + uninitialized COMMON variable or common_local_p is true. */ + bool defined_locally = (!DECL_EXTERNAL (exp) + && (!uninited_common || common_local_p)); if (symtab_node *node = symtab_node::get (exp)) { if (node->in_other_partition) @@ -6878,10 +6891,7 @@ default_binds_local_p_3 (const_tree exp, bool shlib, bool weak_dominate, /* Uninitialized COMMON variable may be unified with symbols resolved from other modules. */ - if (DECL_COMMON (exp) - && !resolved_locally - && (DECL_INITIAL (exp) == NULL - || (!in_lto_p && DECL_INITIAL (exp) == error_mark_node))) + if (uninited_common && !resolved_locally) return false; /* Otherwise we're left with initialized (or non-common) global data @@ -6895,21 +6905,22 @@ default_binds_local_p_3 (const_tree exp, bool shlib, bool weak_dominate, bool default_binds_local_p (const_tree exp) { - return default_binds_local_p_3 (exp, flag_shlib != 0, true, false); + return default_binds_local_p_3 (exp, flag_shlib != 0, true, false, false); } -/* Similar to default_binds_local_p, but protected data may be - external. */ +/* Similar to default_binds_local_p, but common symbol may be local. */ + bool default_binds_local_p_2 (const_tree exp) { - return default_binds_local_p_3 (exp, flag_shlib != 0, true, true); + return default_binds_local_p_3 (exp, flag_shlib != 0, true, false, + !flag_pic); } bool default_binds_local_p_1 (const_tree exp, int shlib) { - return default_binds_local_p_3 (exp, shlib != 0, false, false); + return default_binds_local_p_3 (exp, shlib != 0, false, false, false); } /* Return true when references to DECL must bind to current definition in diff --git a/contrib/gcc-5.0/libitm/ChangeLog b/contrib/gcc-5.0/libitm/ChangeLog index e46819cf3a..d6c7c1c1a5 100644 --- a/contrib/gcc-5.0/libitm/ChangeLog +++ b/contrib/gcc-5.0/libitm/ChangeLog @@ -1,3 +1,7 @@ +2015-04-22 Release Manager + + * GCC 5.1.0 released. + 2015-01-15 H.J. Lu PR libitm/64360 -- 2.41.0