5.0.0-0.7

This commit is contained in:
Jakub Jelinek 2015-02-05 11:15:05 +01:00
parent ff411575cc
commit 2f08a3f6d8
5 changed files with 18 additions and 291 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
/gcc-5.0.0-20150123.tar.bz2 /gcc-5.0.0-20150123.tar.bz2
/gcc-5.0.0-20150130.tar.bz2 /gcc-5.0.0-20150130.tar.bz2
/gcc-5.0.0-20150205.tar.bz2

View File

@ -1,9 +1,9 @@
%global DATE 20150130 %global DATE 20150205
%global SVNREV 220295 %global SVNREV 220439
%global gcc_version 5.0.0 %global gcc_version 5.0.0
# Note, gcc_release must be integer, if you want to add suffixes to # Note, gcc_release must be integer, if you want to add suffixes to
# %{release}, append them after %{gcc_release} on Release: line. # %{release}, append them after %{gcc_release} on Release: line.
%global gcc_release 0.6 %global gcc_release 0.7
%global _unpackaged_files_terminate_build 0 %global _unpackaged_files_terminate_build 0
%global _performance_build 1 %global _performance_build 1
%global multilib_64_archs sparc64 ppc64 ppc64p7 s390x x86_64 %global multilib_64_archs sparc64 ppc64 ppc64p7 s390x x86_64
@ -199,8 +199,7 @@ Patch12: gcc5-libgo-p224.patch
Patch13: gcc5-aarch64-async-unw-tables.patch Patch13: gcc5-aarch64-async-unw-tables.patch
Patch14: gcc5-libsanitize-aarch64-va42.patch Patch14: gcc5-libsanitize-aarch64-va42.patch
Patch15: gcc5-pr61925.patch Patch15: gcc5-pr61925.patch
Patch16: gcc5-pr64817.patch Patch16: gcc5-pr64878.patch
Patch17: gcc5-pr64803.patch
# On ARM EABI systems, we do want -gnueabi to be part of the # On ARM EABI systems, we do want -gnueabi to be part of the
# target triple. # target triple.
@ -751,8 +750,7 @@ rm -f libgo/go/crypto/elliptic/p224{,_test}.go
%patch13 -p0 -b .aarch64-async-unw-tables~ %patch13 -p0 -b .aarch64-async-unw-tables~
%patch14 -p0 -b .libsanitize-aarch64-va42~ %patch14 -p0 -b .libsanitize-aarch64-va42~
%patch15 -p0 -b .pr61925~ %patch15 -p0 -b .pr61925~
%patch16 -p0 -b .pr64817~ %patch16 -p0 -b .pr64878~
%patch17 -p0 -b .pr64803~
%if 0%{?_enable_debug_packages} %if 0%{?_enable_debug_packages}
mkdir dwz-wrapper mkdir dwz-wrapper
@ -2938,6 +2936,17 @@ fi
%doc rpm.doc/changelogs/libcc1/ChangeLog* %doc rpm.doc/changelogs/libcc1/ChangeLog*
%changelog %changelog
* Thu Feb 5 2015 Jakub Jelinek <jakub@redhat.com> 5.0.0-0.7
- update from the trunk
- PRs ada/64349, c++/64877, c++/64901, c/64824, c/64868, fortran/64757,
gcov/64123, go/64836, go/64838, ipa/61548, ipa/64686, ipa/64872,
jit/64810, libobjc/63765, libstdc++/64467, libstdc++/64883,
middle-end/61225, middle-end/62103, middle-end/64922,
rtl-optimization/64756, rtl-optimization/64905, target/62631,
target/64047, target/64159, target/64231, target/64408, target/64660,
target/64688, target/64851, target/64882, testsuite/64796
- FSM jump threading fix (PR tree-optimization/64878)
* Fri Jan 30 2015 Jakub Jelinek <jakub@redhat.com> 5.0.0-0.6 * Fri Jan 30 2015 Jakub Jelinek <jakub@redhat.com> 5.0.0-0.6
- update from the trunk - update from the trunk
- PRs ada/64349, bootstrap/64612, bootstrap/64754, c++/49508, c++/58597, - PRs ada/64349, bootstrap/64612, bootstrap/64754, c++/49508, c++/58597,

View File

@ -1,101 +0,0 @@
2015-01-30 Dodji Seketeli <dodji@redhat.com>
PR preprocessor/64803
* internal.h (cpp_reader::top_most_macro_node): New data member.
* macro.c (enter_macro_context): Pass the location of the end of
the top-most invocation of the function-like macro, or the
location of the expansion point of the top-most object-like macro.
(cpp_get_token_1): Store the top-most macro node in the new
pfile->top_most_macro_node data member.
* gcc.dg/cpp/builtin-macro-1.c: New test case.
--- libcpp/internal.h
+++ libcpp/internal.h
@@ -421,6 +421,11 @@ struct cpp_reader
macro invocation. */
source_location invocation_location;
+ /* This is the node representing the macro being expanded at
+ top-level. The value of this data member is valid iff
+ in_macro_expansion_p() returns TRUE. */
+ cpp_hashnode *top_most_macro_node;
+
/* Nonzero if we are about to expand a macro. Note that if we are
really expanding a macro, the function macro_of_context returns
the macro being expanded and this flag is set to false. Client
--- libcpp/macro.c
+++ libcpp/macro.c
@@ -1228,7 +1228,24 @@ enter_macro_context (cpp_reader *pfile, cpp_hashnode *node,
pfile->about_to_expand_macro_p = false;
/* Handle built-in macros and the _Pragma operator. */
- return builtin_macro (pfile, node, location);
+ {
+ source_location loc;
+ if (/* The top-level macro invocation that triggered the expansion
+ we are looking at is with a standard macro ...*/
+ !(pfile->top_most_macro_node->flags & NODE_BUILTIN)
+ /* ... and it's a function-like macro invocation. */
+ && pfile->top_most_macro_node->value.macro->fun_like)
+ /* Then the location of the end of the macro invocation is the
+ location of the closing parenthesis. */
+ loc = pfile->cur_token[-1].src_loc;
+ else
+ /* Otherwise, the location of the end of the macro invocation is
+ the location of the expansion point of that top-level macro
+ invocation. */
+ loc = location;
+
+ return builtin_macro (pfile, node, loc);
+ }
}
/* De-allocate the memory used by BUFF which is an array of instances
@@ -2460,9 +2477,13 @@ cpp_get_token_1 (cpp_reader *pfile, source_location *location)
{
int ret = 0;
/* If not in a macro context, and we're going to start an
- expansion, record the location. */
+ expansion, record the location and the top level macro
+ about to be expanded. */
if (!in_macro_expansion_p (pfile))
- pfile->invocation_location = result->src_loc;
+ {
+ pfile->invocation_location = result->src_loc;
+ pfile->top_most_macro_node = node;
+ }
if (pfile->state.prevent_expansion)
break;
--- gcc/testsuite/gcc.dg/cpp/builtin-macro-1.c
+++ gcc/testsuite/gcc.dg/cpp/builtin-macro-1.c
@@ -0,0 +1,28 @@
+/* Origin PR preprocessor/64803
+
+ This test ensures that the value the __LINE__ macro expands to is
+ constant and corresponds to the line of the closing parenthesis of
+ the top-most function-like macro expansion it's part of.
+
+ { dg-do run }
+ { do-options -no-integrated-cpp } */
+
+#include <assert.h>
+
+#define C(a, b) a ## b
+#define L(x) C(L, x)
+#define M(a) int L(__LINE__) = __LINE__; assert(L(__LINE__) == __LINE__);
+
+int
+main()
+{
+ M(a
+ );
+
+ assert(L20 == 20); /* 20 is the line number of the
+ closing parenthesis of the
+ invocation of the M macro. Please
+ adjust in case the layout of this
+ file changes. */
+ return 0;
+}

View File

@ -1,182 +0,0 @@
2015-01-30 Jakub Jelinek <jakub@redhat.com>
PR debug/64817
* cfgexpand.c (deep_ter_debug_map): New variable.
(avoid_deep_ter_for_debug): New function.
(expand_debug_expr): If TERed SSA_NAME is in
deep_ter_debug_map, use the corresponding DEBUG_EXPR_DECL
instead of trying to expand SSA_NAME's def stmt.
(expand_debug_locations): When expanding debug bind
of a DEBUG_EXPR_DECL to corresponding SSA_NAME,
temporarily remove the DEBUG_EXPR_DECL from deep_ter_debug_map's
value.
(pass_expand::execute): Call avoid_deep_ter_for_debug on
all debug bind stmts. Delete deep_ter_debug_map after
expand_debug_location if non-NULL and clear it.
* gcc.dg/pr64817-1.c: New test.
* gcc.dg/pr64817-2.c: New test.
--- gcc/cfgexpand.c.jj 2015-01-28 21:24:56.000000000 +0100
+++ gcc/cfgexpand.c 2015-01-30 13:22:46.002579984 +0100
@@ -3767,6 +3767,48 @@ convert_debug_memory_address (machine_mo
return x;
}
+/* Map from SSA_NAMEs to corresponding DEBUG_EXPR_DECLs created
+ by avoid_deep_ter_for_debug. */
+
+hash_map<tree, tree> *deep_ter_debug_map;
+
+/* Split too deep TER chains for debug stmts using debug temporaries. */
+
+static void
+avoid_deep_ter_for_debug (gimple stmt, int depth)
+{
+ use_operand_p use_p;
+ ssa_op_iter iter;
+ FOR_EACH_SSA_USE_OPERAND (use_p, stmt, iter, SSA_OP_USE)
+ {
+ tree use = USE_FROM_PTR (use_p);
+ if (TREE_CODE (use) != SSA_NAME || SSA_NAME_IS_DEFAULT_DEF (use))
+ continue;
+ gimple g = get_gimple_for_ssa_name (use);
+ if (g == NULL)
+ continue;
+ if (depth > 6 && !stmt_ends_bb_p (g))
+ {
+ if (deep_ter_debug_map == NULL)
+ deep_ter_debug_map = new hash_map<tree, tree>;
+
+ tree &vexpr = deep_ter_debug_map->get_or_insert (use);
+ if (vexpr != NULL)
+ continue;
+ vexpr = make_node (DEBUG_EXPR_DECL);
+ gimple def_temp = gimple_build_debug_bind (vexpr, use, g);
+ DECL_ARTIFICIAL (vexpr) = 1;
+ TREE_TYPE (vexpr) = TREE_TYPE (use);
+ DECL_MODE (vexpr) = TYPE_MODE (TREE_TYPE (use));
+ gimple_stmt_iterator gsi = gsi_for_stmt (g);
+ gsi_insert_after (&gsi, def_temp, GSI_NEW_STMT);
+ avoid_deep_ter_for_debug (def_temp, 0);
+ }
+ else
+ avoid_deep_ter_for_debug (g, depth + 1);
+ }
+}
+
/* Return an RTX equivalent to the value of the parameter DECL. */
static rtx
@@ -4654,7 +4696,16 @@ expand_debug_expr (tree exp)
gimple g = get_gimple_for_ssa_name (exp);
if (g)
{
- op0 = expand_debug_expr (gimple_assign_rhs_to_tree (g));
+ tree t = NULL_TREE;
+ if (deep_ter_debug_map)
+ {
+ tree *slot = deep_ter_debug_map->get (exp);
+ if (slot)
+ t = *slot;
+ }
+ if (t == NULL_TREE)
+ t = gimple_assign_rhs_to_tree (g);
+ op0 = expand_debug_expr (t);
if (!op0)
return NULL;
}
@@ -4961,6 +5012,25 @@ expand_debug_locations (void)
if (INSN_VAR_LOCATION_STATUS (insn)
== VAR_INIT_STATUS_UNINITIALIZED)
val = expand_debug_source_expr (value);
+ /* The avoid_deep_ter_for_debug function inserts
+ debug bind stmts after SSA_NAME definition, with the
+ SSA_NAME as the whole bind location. Disable temporarily
+ expansion of that SSA_NAME into the DEBUG_EXPR_DECL
+ being defined in this DEBUG_INSN. */
+ else if (deep_ter_debug_map && TREE_CODE (value) == SSA_NAME)
+ {
+ tree *slot = deep_ter_debug_map->get (value);
+ if (slot)
+ {
+ if (*slot == INSN_VAR_LOCATION_DECL (insn))
+ *slot = NULL_TREE;
+ else
+ slot = NULL;
+ }
+ val = expand_debug_expr (value);
+ if (slot)
+ *slot = INSN_VAR_LOCATION_DECL (insn);
+ }
else
val = expand_debug_expr (value);
gcc_assert (last == get_last_insn ());
@@ -5821,6 +5891,15 @@ pass_expand::execute (function *fun)
timevar_pop (TV_OUT_OF_SSA);
SA.partition_to_pseudo = XCNEWVEC (rtx, SA.map->num_partitions);
+ if (MAY_HAVE_DEBUG_STMTS && flag_tree_ter)
+ {
+ gimple_stmt_iterator gsi;
+ FOR_EACH_BB_FN (bb, cfun)
+ for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
+ if (gimple_debug_bind_p (gsi_stmt (gsi)))
+ avoid_deep_ter_for_debug (gsi_stmt (gsi), 0);
+ }
+
/* Make sure all values used by the optimization passes have sane
defaults. */
reg_renumber = 0;
@@ -6008,6 +6087,12 @@ pass_expand::execute (function *fun)
if (MAY_HAVE_DEBUG_INSNS)
expand_debug_locations ();
+ if (deep_ter_debug_map)
+ {
+ delete deep_ter_debug_map;
+ deep_ter_debug_map = NULL;
+ }
+
/* Free stuff we no longer need after GIMPLE optimizations. */
free_dominance_info (CDI_DOMINATORS);
free_dominance_info (CDI_POST_DOMINATORS);
--- gcc/testsuite/gcc.dg/pr64817-1.c.jj 2015-01-30 13:33:05.061143850 +0100
+++ gcc/testsuite/gcc.dg/pr64817-1.c 2015-01-30 13:32:33.000000000 +0100
@@ -0,0 +1,20 @@
+/* PR debug/64817 */
+/* { dg-do compile } */
+/* { dg-options "-O3 -g" } */
+
+int a, b, d;
+
+void
+foo (void)
+{
+ for (b = 0; b < 9; b++)
+ {
+ int e;
+ for (d = 0; d < 5; d++)
+ {
+ a &= 231;
+ a ^= 14;
+ }
+ e = (a ^= 1) < 0;
+ }
+}
--- gcc/testsuite/gcc.dg/pr64817-2.c.jj 2015-01-20 10:01:16.345964420 +0100
+++ gcc/testsuite/gcc.dg/pr64817-2.c 2015-01-30 18:37:49.055911292 +0100
@@ -0,0 +1,13 @@
+/* PR debug/64817 */
+/* { dg-do compile } */
+/* { dg-options "-O3 -g" } */
+
+int a;
+
+void
+foo (void)
+{
+ int e;
+ a = ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((a & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) ^ 1;
+ e = (a < 0);
+}

View File

@ -1 +1 @@
80ccb31c5fbade3579f4aa74758f4fd9 gcc-5.0.0-20150130.tar.bz2 7a2f0142ef9c636fec15e8896a1b637c gcc-5.0.0-20150205.tar.bz2