This commit is contained in:
Jakub Jelinek 2014-12-12 14:42:21 +01:00
parent c2cec65b77
commit d266a563d9
6 changed files with 77 additions and 226 deletions

1
.gitignore vendored
View File

@ -27,3 +27,4 @@
/gcc-4.9.1-20141017.tar.bz2 /gcc-4.9.1-20141017.tar.bz2
/gcc-4.9.1-20141024.tar.bz2 /gcc-4.9.1-20141024.tar.bz2
/gcc-4.9.2-20141101.tar.bz2 /gcc-4.9.2-20141101.tar.bz2
/gcc-4.9.2-20141212.tar.bz2

View File

@ -1,9 +1,9 @@
%global DATE 20141101 %global DATE 20141212
%global SVNREV 216995 %global SVNREV 218667
%global gcc_version 4.9.2 %global gcc_version 4.9.2
# 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 1 %global gcc_release 2
%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
@ -195,12 +195,11 @@ Patch9: gcc49-cloog-dl2.patch
Patch10: gcc49-pr38757.patch Patch10: gcc49-pr38757.patch
Patch11: gcc49-libstdc++-docs.patch Patch11: gcc49-libstdc++-docs.patch
Patch12: gcc49-no-add-needed.patch Patch12: gcc49-no-add-needed.patch
Patch14: gcc49-pr56493.patch Patch13: gcc49-color-auto.patch
Patch15: gcc49-color-auto.patch Patch14: gcc49-libgo-p224.patch
Patch16: gcc49-libgo-p224.patch Patch15: gcc49-aarch64-async-unw-tables.patch
Patch17: gcc49-aarch64-async-unw-tables.patch Patch16: gcc49-aarch64-unwind-opt.patch
Patch18: gcc49-aarch64-unwind-opt.patch Patch17: gcc49-pr64269.patch
Patch19: gcc49-pr63659.patch
Patch1100: cloog-%{cloog_version}-ppc64le-config.patch Patch1100: cloog-%{cloog_version}-ppc64le-config.patch
@ -721,15 +720,14 @@ package or when debugging this package.
%patch11 -p0 -b .libstdc++-docs~ %patch11 -p0 -b .libstdc++-docs~
%endif %endif
%patch12 -p0 -b .no-add-needed~ %patch12 -p0 -b .no-add-needed~
%patch14 -p0 -b .pr56493~
%if 0%{?fedora} >= 20 || 0%{?rhel} >= 7 %if 0%{?fedora} >= 20 || 0%{?rhel} >= 7
%patch15 -p0 -b .color-auto~ %patch13 -p0 -b .color-auto~
%endif %endif
%patch16 -p0 -b .libgo-p224~ %patch14 -p0 -b .libgo-p224~
rm -f libgo/go/crypto/elliptic/p224{,_test}.go rm -f libgo/go/crypto/elliptic/p224{,_test}.go
%patch17 -p0 -b .aarch64-async-unw-tables~ %patch15 -p0 -b .aarch64-async-unw-tables~
%patch18 -p0 -b .aarch64-unwind-opt~ %patch16 -p0 -b .aarch64-unwind-opt~
%patch19 -p0 -b .pr63659~ %patch17 -p0 -b .pr64269~
%if 0%{?_enable_debug_packages} %if 0%{?_enable_debug_packages}
cat > split-debuginfo.sh <<\EOF cat > split-debuginfo.sh <<\EOF
@ -2805,6 +2803,26 @@ fi
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/plugin %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/plugin
%changelog %changelog
* Fri Dec 12 2014 Jakub Jelinek <jakub@redhat.com> 4.9.2-2
- update from the 4.9 branch
- PRs ada/42978, ada/47500, bootstrap/63703, bootstrap/64213, c++/56493,
c++/63265, c++/63849, c/52769, c/59708, fortran/63938, ipa/63551,
ipa/63838, ipa/64153, libstdc++/61947, libstdc++/63497,
libstdc++/63840, libstdc++/64103, libstdc++/64140, libstdc++/64203,
middle-end/63665, middle-end/63738, middle-end/63762,
middle-end/64067, middle-end/64111, middle-end/64225,
preprocessor/60436, rtl-optimization/63475, rtl-optimization/63483,
rtl-optimization/64037, sanitizer/63913, target/50751, target/51244,
target/53976, target/55351, target/56846, target/59593, target/60111,
target/61535, target/63538, target/63661, target/63673, target/63783,
target/63947, target/64108, target/64113, target/64115,
testsuite/63305, tree-optimization/61686, tree-optimization/61750,
tree-optimization/61927, tree-optimization/62021,
tree-optimization/62167, tree-optimization/62238,
tree-optimization/63605, tree-optimization/63738,
tree-optimization/63841, tree-optimization/63915,
tree-optimization/64191
* Sat Nov 1 2014 Jakub Jelinek <jakub@redhat.com> 4.9.2-1 * Sat Nov 1 2014 Jakub Jelinek <jakub@redhat.com> 4.9.2-1
- update from the 4.9 branch - update from the 4.9 branch
- GCC 4.9.2 release - GCC 4.9.2 release

View File

@ -1,76 +0,0 @@
2013-06-17 Jakub Jelinek <jakub@redhat.com>
PR c++/56493
* convert.c (convert_to_real, convert_to_expr, convert_to_complex):
Handle COMPOUND_EXPR.
* c-c++-common/pr56493.c: New test.
--- gcc/convert.c.jj 2013-05-13 09:44:53.000000000 +0200
+++ gcc/convert.c 2013-06-16 12:16:13.754108523 +0200
@@ -95,6 +95,15 @@ convert_to_real (tree type, tree expr)
enum built_in_function fcode = builtin_mathfn_code (expr);
tree itype = TREE_TYPE (expr);
+ if (TREE_CODE (expr) == COMPOUND_EXPR)
+ {
+ tree t = convert_to_real (type, TREE_OPERAND (expr, 1));
+ if (t == TREE_OPERAND (expr, 1))
+ return expr;
+ return build2_loc (EXPR_LOCATION (expr), COMPOUND_EXPR, TREE_TYPE (t),
+ TREE_OPERAND (expr, 0), t);
+ }
+
/* Disable until we figure out how to decide whether the functions are
present in runtime. */
/* Convert (float)sqrt((double)x) where x is float into sqrtf(x) */
@@ -366,6 +375,15 @@ convert_to_integer (tree type, tree expr
return error_mark_node;
}
+ if (ex_form == COMPOUND_EXPR)
+ {
+ tree t = convert_to_integer (type, TREE_OPERAND (expr, 1));
+ if (t == TREE_OPERAND (expr, 1))
+ return expr;
+ return build2_loc (EXPR_LOCATION (expr), COMPOUND_EXPR, TREE_TYPE (t),
+ TREE_OPERAND (expr, 0), t);
+ }
+
/* Convert e.g. (long)round(d) -> lround(d). */
/* If we're converting to char, we may encounter differing behavior
between converting from double->char vs double->long->char.
@@ -854,6 +872,14 @@ convert_to_complex (tree type, tree expr
if (TYPE_MAIN_VARIANT (elt_type) == TYPE_MAIN_VARIANT (subtype))
return expr;
+ else if (TREE_CODE (expr) == COMPOUND_EXPR)
+ {
+ tree t = convert_to_complex (type, TREE_OPERAND (expr, 1));
+ if (t == TREE_OPERAND (expr, 1))
+ return expr;
+ return build2_loc (EXPR_LOCATION (expr), COMPOUND_EXPR,
+ TREE_TYPE (t), TREE_OPERAND (expr, 0), t);
+ }
else if (TREE_CODE (expr) == COMPLEX_EXPR)
return fold_build2 (COMPLEX_EXPR, type,
convert (subtype, TREE_OPERAND (expr, 0)),
--- gcc/testsuite/c-c++-common/pr56493.c.jj 2013-06-17 10:24:36.891659600 +0200
+++ gcc/testsuite/c-c++-common/pr56493.c 2013-06-17 10:24:33.164720149 +0200
@@ -0,0 +1,16 @@
+/* PR c++/56493 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-gimple" } */
+
+unsigned long long bar (void);
+int x;
+
+void
+foo (void)
+{
+ x += bar ();
+}
+
+/* Verify we narrow the addition from unsigned long long to unsigned int type. */
+/* { dg-final { scan-tree-dump " (\[a-zA-Z._0-9]*) = \\(unsigned int\\) \[^;\n\r]*;.* (\[a-zA-Z._0-9]*) = \\(unsigned int\\) \[^;\n\r]*;.* = \\1 \\+ \\2;" "gimple" { target { ilp32 || lp64 } } } } */
+/* { dg-final { cleanup-tree-dump "gimple" } } */

View File

@ -1,134 +0,0 @@
2014-10-31 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/63659
* ree.c (update_reg_equal_equiv_notes): New function.
(combine_set_extension, transform_ifelse): Use it.
* gcc.c-torture/execute/pr63659.c: New test.
--- gcc/ree.c.jj 2014-10-22 15:52:18.000000000 +0200
+++ gcc/ree.c 2014-10-27 19:18:37.287412478 +0100
@@ -261,6 +261,50 @@ typedef struct ext_cand
static int max_insn_uid;
+/* Update or remove REG_EQUAL or REG_EQUIV notes for INSN. */
+
+static bool
+update_reg_equal_equiv_notes (rtx insn, enum machine_mode new_mode,
+ enum machine_mode old_mode, enum rtx_code code)
+{
+ rtx *loc = &REG_NOTES (insn);
+ while (*loc)
+ {
+ enum reg_note kind = REG_NOTE_KIND (*loc);
+ if (kind == REG_EQUAL || kind == REG_EQUIV)
+ {
+ rtx orig_src = XEXP (*loc, 0);
+ /* Update equivalency constants. Recall that RTL constants are
+ sign-extended. */
+ if (GET_CODE (orig_src) == CONST_INT
+ && HOST_BITS_PER_WIDE_INT >= GET_MODE_BITSIZE (new_mode))
+ {
+ if (INTVAL (orig_src) >= 0 || code == SIGN_EXTEND)
+ /* Nothing needed. */;
+ else
+ {
+ /* Zero-extend the negative constant by masking out the
+ bits outside the source mode. */
+ rtx new_const_int
+ = gen_int_mode (INTVAL (orig_src)
+ & GET_MODE_MASK (old_mode),
+ new_mode);
+ if (!validate_change (insn, &XEXP (*loc, 0),
+ new_const_int, true))
+ return false;
+ }
+ loc = &XEXP (*loc, 1);
+ }
+ /* Drop all other notes, they assume a wrong mode. */
+ else if (!validate_change (insn, loc, XEXP (*loc, 1), true))
+ return false;
+ }
+ else
+ loc = &XEXP (*loc, 1);
+ }
+ return true;
+}
+
/* Given a insn (CURR_INSN), an extension candidate for removal (CAND)
and a pointer to the SET rtx (ORIG_SET) that needs to be modified,
this code modifies the SET rtx to a new SET rtx that extends the
@@ -282,6 +326,7 @@ static bool
combine_set_extension (ext_cand *cand, rtx curr_insn, rtx *orig_set)
{
rtx orig_src = SET_SRC (*orig_set);
+ enum machine_mode orig_mode = GET_MODE (SET_DEST (*orig_set));
rtx new_set;
rtx cand_pat = PATTERN (cand->insn);
@@ -318,9 +363,8 @@ combine_set_extension (ext_cand *cand, r
{
/* Zero-extend the negative constant by masking out the bits outside
the source mode. */
- enum machine_mode src_mode = GET_MODE (SET_DEST (*orig_set));
rtx new_const_int
- = gen_int_mode (INTVAL (orig_src) & GET_MODE_MASK (src_mode),
+ = gen_int_mode (INTVAL (orig_src) & GET_MODE_MASK (orig_mode),
GET_MODE (new_reg));
new_set = gen_rtx_SET (VOIDmode, new_reg, new_const_int);
}
@@ -359,7 +403,9 @@ combine_set_extension (ext_cand *cand, r
/* This change is a part of a group of changes. Hence,
validate_change will not try to commit the change. */
- if (validate_change (curr_insn, orig_set, new_set, true))
+ if (validate_change (curr_insn, orig_set, new_set, true)
+ && update_reg_equal_equiv_notes (curr_insn, cand->mode, orig_mode,
+ cand->code))
{
if (dump_file)
{
@@ -409,7 +455,9 @@ transform_ifelse (ext_cand *cand, rtx de
ifexpr = gen_rtx_IF_THEN_ELSE (cand->mode, cond, map_srcreg, map_srcreg2);
new_set = gen_rtx_SET (VOIDmode, map_dstreg, ifexpr);
- if (validate_change (def_insn, &PATTERN (def_insn), new_set, true))
+ if (validate_change (def_insn, &PATTERN (def_insn), new_set, true)
+ && update_reg_equal_equiv_notes (def_insn, cand->mode, GET_MODE (dstreg),
+ cand->code))
{
if (dump_file)
{
--- gcc/testsuite/gcc.c-torture/execute/pr63659.c.jj 2014-10-27 19:26:57.720902738 +0100
+++ gcc/testsuite/gcc.c-torture/execute/pr63659.c 2014-10-27 19:26:36.000000000 +0100
@@ -0,0 +1,29 @@
+/* PR rtl-optimization/63659 */
+
+int a, b, c, *d = &b, g, h, i;
+unsigned char e;
+char f;
+
+int
+main ()
+{
+ while (a)
+ {
+ for (a = 0; a; a++)
+ for (; c; c++)
+ ;
+ if (i)
+ break;
+ }
+
+ char j = c, k = -1, l;
+ l = g = j >> h;
+ f = l == 0 ? k : k % l;
+ e = 0 ? 0 : f;
+ *d = e;
+
+ if (b != 255)
+ __builtin_abort ();
+
+ return 0;
+}

42
gcc49-pr64269.patch Normal file
View File

@ -0,0 +1,42 @@
2014-12-12 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/64269
* tree-ssa-forwprop.c (simplify_builtin_call): Bail out if
len2 or diff are too large.
* gcc.c-torture/compile/pr64269.c: New test.
--- gcc/tree-ssa-forwprop.c.jj 2014-12-01 14:57:30.000000000 +0100
+++ gcc/tree-ssa-forwprop.c 2014-12-12 09:46:05.790053928 +0100
@@ -1288,7 +1288,8 @@ simplify_builtin_call (gimple_stmt_itera
use_operand_p use_p;
if (!tree_fits_shwi_p (val2)
- || !tree_fits_uhwi_p (len2))
+ || !tree_fits_uhwi_p (len2)
+ || compare_tree_int (len2, 1024) == 1)
break;
if (is_gimple_call (stmt1))
{
@@ -1354,7 +1355,8 @@ simplify_builtin_call (gimple_stmt_itera
is not constant, or is bigger than memcpy length, bail out. */
if (diff == NULL
|| !tree_fits_uhwi_p (diff)
- || tree_int_cst_lt (len1, diff))
+ || tree_int_cst_lt (len1, diff)
+ || compare_tree_int (diff, 1024) == 1)
break;
/* Use maximum of difference plus memset length and memcpy length
--- gcc/testsuite/gcc.c-torture/compile/pr64269.c.jj 2014-12-12 09:47:04.795015479 +0100
+++ gcc/testsuite/gcc.c-torture/compile/pr64269.c 2014-12-12 09:46:51.000000000 +0100
@@ -0,0 +1,9 @@
+/* PR tree-optimization/64269 */
+
+void
+foo (char *p)
+{
+ __SIZE_TYPE__ s = ~(__SIZE_TYPE__)0;
+ *p = 0;
+ __builtin_memset (p + 1, 0, s);
+}

View File

@ -1,3 +1,3 @@
e34fca0540d840e5d0f6427e98c92252 cloog-0.18.1.tar.gz e34fca0540d840e5d0f6427e98c92252 cloog-0.18.1.tar.gz
3b5578a7f9e33fb0b6321ab5283c4cbf gcc-4.9.2-20141101.tar.bz2 ccd8cac944582f8d2ddf5274a15df176 gcc-4.9.2-20141212.tar.bz2
e039bfcfb6c2ab039b8ee69bf883e824 isl-0.12.2.tar.bz2 e039bfcfb6c2ab039b8ee69bf883e824 isl-0.12.2.tar.bz2