5.0.0-0.20

This commit is contained in:
Jakub Jelinek 2015-03-16 18:42:57 +01:00
parent 7fcf30a7ea
commit 91c7bec969
6 changed files with 11 additions and 332 deletions

1
.gitignore vendored
View File

@ -11,3 +11,4 @@
/gcc-5.0.0-20150224.tar.bz2
/gcc-5.0.0-20150226.tar.bz2
/gcc-5.0.0-20150313.tar.bz2
/gcc-5.0.0-20150316.tar.bz2

View File

@ -1,9 +1,9 @@
%global DATE 20150313
%global SVNREV 221424
%global DATE 20150316
%global SVNREV 221461
%global gcc_version 5.0.0
# Note, gcc_release must be integer, if you want to add suffixes to
# %{release}, append them after %{gcc_release} on Release: line.
%global gcc_release 0.19
%global gcc_release 0.20
%global _unpackaged_files_terminate_build 0
%global _performance_build 1
%global multilib_64_archs sparc64 ppc64 ppc64p7 s390x x86_64
@ -198,9 +198,6 @@ Patch11: gcc5-no-add-needed.patch
Patch12: gcc5-libgo-p224.patch
Patch13: gcc5-aarch64-async-unw-tables.patch
Patch14: gcc5-libsanitize-aarch64-va42.patch
Patch15: gcc5-pr65369.patch
Patch16: gcc5-pr65401.patch
Patch17: gcc5-pr65418.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@ -750,9 +747,6 @@ package or when debugging this package.
rm -f libgo/go/crypto/elliptic/p224{,_test}.go
%patch13 -p0 -b .aarch64-async-unw-tables~
%patch14 -p0 -b .libsanitize-aarch64-va42~
%patch15 -p0 -b .pr65369~
%patch16 -p0 -b .pr65401~
%patch17 -p0 -b .pr65418~
%if 0%{?_enable_debug_packages}
mkdir dwz-wrapper
@ -1026,7 +1020,7 @@ CC="$CC" CXX="$CXX" CFLAGS="$OPT_FLAGS" \
--enable-languages=c,c++,objc,obj-c++,fortran${enablelada}${enablelgo},lto \
$CONFIGURE_OPTS
%ifarch sparc sparcv9 sparc64 aarch64
%ifarch sparc sparcv9 sparc64 %{arm}
make %{?_smp_mflags} BOOT_CFLAGS="$OPT_FLAGS" bootstrap
%else
make %{?_smp_mflags} BOOT_CFLAGS="$OPT_FLAGS" profiledbootstrap
@ -2938,6 +2932,11 @@ fi
%doc rpm.doc/changelogs/libcc1/ChangeLog*
%changelog
* Mon Mar 16 2015 Jakub Jelinek <jakub@redhat.com> 5.0.0-0.20
- update from the trunk
- PRs fortran/61138, middle-end/65409, middle-end/65414, middle-end/65431,
sanitizer/64820, target/63150
* Fri Mar 13 2015 Jakub Jelinek <jakub@redhat.com> 5.0.0-0.19
- update from the trunk
- PRs ada/65259, ada/65319, bootstrap/25672, bootstrap/65150, c++/64227,

View File

@ -1,81 +0,0 @@
2015-03-13 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/65369
* tree-vect-stmts.c (vectorizable_load) <case dr_explicit_realign>:
Set bump to vs * TYPE_SIZE_UNIT (elem_type) - 1 instead of
(vs - 1) * TYPE_SIZE_UNIT (elem_type).
* gcc.c-torture/execute/pr65369.c: New test.
--- gcc/tree-vect-stmts.c.jj 2015-03-09 08:05:13.000000000 +0100
+++ gcc/tree-vect-stmts.c 2015-03-13 17:27:30.613529768 +0100
@@ -6468,9 +6468,8 @@ vectorizable_load (gimple stmt, gimple_s
case dr_explicit_realign:
{
tree ptr, bump;
- tree vs_minus_1;
- vs_minus_1 = size_int (TYPE_VECTOR_SUBPARTS (vectype) - 1);
+ tree vs = size_int (TYPE_VECTOR_SUBPARTS (vectype));
if (compute_in_loop)
msq = vect_setup_realignment (first_stmt, gsi,
@@ -6499,8 +6498,9 @@ vectorizable_load (gimple stmt, gimple_s
vect_finish_stmt_generation (stmt, new_stmt, gsi);
msq = new_temp;
- bump = size_binop (MULT_EXPR, vs_minus_1,
+ bump = size_binop (MULT_EXPR, vs,
TYPE_SIZE_UNIT (elem_type));
+ bump = size_binop (MINUS_EXPR, bump, size_one_node);
ptr = bump_vector_ptr (dataref_ptr, NULL, gsi, stmt, bump);
new_stmt = gimple_build_assign
(NULL_TREE, BIT_AND_EXPR, ptr,
--- gcc/testsuite/gcc.c-torture/execute/pr65369.c.jj 2015-03-13 17:37:10.926175685 +0100
+++ gcc/testsuite/gcc.c-torture/execute/pr65369.c 2015-03-13 17:35:40.000000000 +0100
@@ -0,0 +1,45 @@
+/* PR tree-optimization/65369 */
+
+static const char data[] =
+ "12345678901234567890123456789012345678901234567890"
+ "123456789012345678901234567890";
+
+__attribute__ ((noinline))
+static void foo (const unsigned int *buf)
+{
+ if (__builtin_memcmp (buf, data, 64))
+ __builtin_abort ();
+}
+
+__attribute__ ((noinline))
+static void bar (const unsigned char *block)
+{
+ unsigned int buf[16];
+ __builtin_memcpy (buf + 0, block + 0, 4);
+ __builtin_memcpy (buf + 1, block + 4, 4);
+ __builtin_memcpy (buf + 2, block + 8, 4);
+ __builtin_memcpy (buf + 3, block + 12, 4);
+ __builtin_memcpy (buf + 4, block + 16, 4);
+ __builtin_memcpy (buf + 5, block + 20, 4);
+ __builtin_memcpy (buf + 6, block + 24, 4);
+ __builtin_memcpy (buf + 7, block + 28, 4);
+ __builtin_memcpy (buf + 8, block + 32, 4);
+ __builtin_memcpy (buf + 9, block + 36, 4);
+ __builtin_memcpy (buf + 10, block + 40, 4);
+ __builtin_memcpy (buf + 11, block + 44, 4);
+ __builtin_memcpy (buf + 12, block + 48, 4);
+ __builtin_memcpy (buf + 13, block + 52, 4);
+ __builtin_memcpy (buf + 14, block + 56, 4);
+ __builtin_memcpy (buf + 15, block + 60, 4);
+ foo (buf);
+}
+
+int
+main ()
+{
+ unsigned char input[sizeof data + 16] __attribute__((aligned (16)));
+ __builtin_memset (input, 0, sizeof input);
+ __builtin_memcpy (input + 1, data, sizeof data);
+ bar (input + 1);
+ return 0;
+}

View File

@ -1,151 +0,0 @@
2015-03-13 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/65401
* combine.c (rtx_equal_for_field_assignment_p): Add widen_x
argument. If true, adjust_address_nv of x with big-endian
correction for the mode widening to GET_MODE (y).
(make_field_assignment): Don't do MEM mode widening here.
Use MEM_P instead of GET_CODE == MEM.
* gcc.c-torture/execute/pr65401.c: New test.
--- gcc/combine.c.jj 2015-02-03 10:38:46.000000000 +0100
+++ gcc/combine.c 2015-03-13 18:46:45.710940306 +0100
@@ -475,7 +475,7 @@ static rtx force_to_mode (rtx, machine_m
unsigned HOST_WIDE_INT, int);
static rtx if_then_else_cond (rtx, rtx *, rtx *);
static rtx known_cond (rtx, enum rtx_code, rtx, rtx);
-static int rtx_equal_for_field_assignment_p (rtx, rtx);
+static int rtx_equal_for_field_assignment_p (rtx, rtx, bool = false);
static rtx make_field_assignment (rtx);
static rtx apply_distributive_law (rtx);
static rtx distribute_and_simplify_rtx (rtx, int);
@@ -9184,8 +9184,23 @@ known_cond (rtx x, enum rtx_code cond, r
assignment as a field assignment. */
static int
-rtx_equal_for_field_assignment_p (rtx x, rtx y)
+rtx_equal_for_field_assignment_p (rtx x, rtx y, bool widen_x)
{
+ if (widen_x && GET_MODE (x) != GET_MODE (y))
+ {
+ if (GET_MODE_SIZE (GET_MODE (x)) > GET_MODE_SIZE (GET_MODE (y)))
+ return 0;
+ if (BYTES_BIG_ENDIAN != WORDS_BIG_ENDIAN)
+ return 0;
+ /* For big endian, adjust the memory offset. */
+ if (BYTES_BIG_ENDIAN)
+ x = adjust_address_nv (x, GET_MODE (y),
+ -subreg_lowpart_offset (GET_MODE (x),
+ GET_MODE (y)));
+ else
+ x = adjust_address_nv (x, GET_MODE (y), 0);
+ }
+
if (x == y || rtx_equal_p (x, y))
return 1;
@@ -9339,16 +9354,15 @@ make_field_assignment (rtx x)
/* The second SUBREG that might get in the way is a paradoxical
SUBREG around the first operand of the AND. We want to
pretend the operand is as wide as the destination here. We
- do this by creating a new MEM in the wider mode for the sole
+ do this by adjusting the MEM to wider mode for the sole
purpose of the call to rtx_equal_for_field_assignment_p. Also
note this trick only works for MEMs. */
else if (GET_CODE (rhs) == AND
&& paradoxical_subreg_p (XEXP (rhs, 0))
- && GET_CODE (SUBREG_REG (XEXP (rhs, 0))) == MEM
+ && MEM_P (SUBREG_REG (XEXP (rhs, 0)))
&& CONST_INT_P (XEXP (rhs, 1))
- && rtx_equal_for_field_assignment_p (gen_rtx_MEM (GET_MODE (dest),
- XEXP (SUBREG_REG (XEXP (rhs, 0)), 0)),
- dest))
+ && rtx_equal_for_field_assignment_p (SUBREG_REG (XEXP (rhs, 0)),
+ dest, true))
c1 = INTVAL (XEXP (rhs, 1)), other = lhs;
else if (GET_CODE (lhs) == AND
&& CONST_INT_P (XEXP (lhs, 1))
@@ -9357,16 +9371,15 @@ make_field_assignment (rtx x)
/* The second SUBREG that might get in the way is a paradoxical
SUBREG around the first operand of the AND. We want to
pretend the operand is as wide as the destination here. We
- do this by creating a new MEM in the wider mode for the sole
+ do this by adjusting the MEM to wider mode for the sole
purpose of the call to rtx_equal_for_field_assignment_p. Also
note this trick only works for MEMs. */
else if (GET_CODE (lhs) == AND
&& paradoxical_subreg_p (XEXP (lhs, 0))
- && GET_CODE (SUBREG_REG (XEXP (lhs, 0))) == MEM
+ && MEM_P (SUBREG_REG (XEXP (lhs, 0)))
&& CONST_INT_P (XEXP (lhs, 1))
- && rtx_equal_for_field_assignment_p (gen_rtx_MEM (GET_MODE (dest),
- XEXP (SUBREG_REG (XEXP (lhs, 0)), 0)),
- dest))
+ && rtx_equal_for_field_assignment_p (SUBREG_REG (XEXP (lhs, 0)),
+ dest, true))
c1 = INTVAL (XEXP (lhs, 1)), other = rhs;
else
return x;
--- gcc/testsuite/gcc.c-torture/execute/pr65401.c.jj 2015-03-13 18:36:30.639817393 +0100
+++ gcc/testsuite/gcc.c-torture/execute/pr65401.c 2015-03-13 18:42:02.693485127 +0100
@@ -0,0 +1,59 @@
+/* PR rtl-optimization/65401 */
+
+struct S { unsigned short s[64]; };
+
+__attribute__((noinline, noclone)) void
+foo (struct S *x)
+{
+ unsigned int i;
+ unsigned char *s;
+
+ s = (unsigned char *) x->s;
+ for (i = 0; i < 64; i++)
+ x->s[i] = s[i * 2] | (s[i * 2 + 1] << 8);
+}
+
+__attribute__((noinline, noclone)) void
+bar (struct S *x)
+{
+ unsigned int i;
+ unsigned char *s;
+
+ s = (unsigned char *) x->s;
+ for (i = 0; i < 64; i++)
+ x->s[i] = (s[i * 2] << 8) | s[i * 2 + 1];
+}
+
+int
+main ()
+{
+ unsigned int i;
+ struct S s;
+ if (sizeof (unsigned short) != 2)
+ return 0;
+ for (i = 0; i < 64; i++)
+ s.s[i] = i + ((64 - i) << 8);
+ foo (&s);
+#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+ for (i = 0; i < 64; i++)
+ if (s.s[i] != (64 - i) + (i << 8))
+ __builtin_abort ();
+#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ for (i = 0; i < 64; i++)
+ if (s.s[i] != i + ((64 - i) << 8))
+ __builtin_abort ();
+#endif
+ for (i = 0; i < 64; i++)
+ s.s[i] = i + ((64 - i) << 8);
+ bar (&s);
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ for (i = 0; i < 64; i++)
+ if (s.s[i] != (64 - i) + (i << 8))
+ __builtin_abort ();
+#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+ for (i = 0; i < 64; i++)
+ if (s.s[i] != i + ((64 - i) << 8))
+ __builtin_abort ();
+#endif
+ return 0;
+}

View File

@ -1,89 +0,0 @@
2015-03-13 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/65418
* tree-ssa-reassoc.c (extract_bit_test_mask): If there
are casts in the first PLUS_EXPR operand, ensure tbias and
*totallowp are in the inner type.
* gcc.c-torture/execute/pr65418-1.c: New test.
* gcc.c-torture/execute/pr65418-2.c: New test.
--- gcc/tree-ssa-reassoc.c.jj 2015-02-26 22:02:39.000000000 +0100
+++ gcc/tree-ssa-reassoc.c 2015-03-13 16:22:50.506295252 +0100
@@ -2439,26 +2439,25 @@ extract_bit_test_mask (tree exp, int pre
&& TREE_CODE (exp) == PLUS_EXPR
&& TREE_CODE (TREE_OPERAND (exp, 1)) == INTEGER_CST)
{
+ tree ret = TREE_OPERAND (exp, 0);
+ STRIP_NOPS (ret);
widest_int bias
= wi::neg (wi::sext (wi::to_widest (TREE_OPERAND (exp, 1)),
TYPE_PRECISION (TREE_TYPE (low))));
- tree tbias = wide_int_to_tree (TREE_TYPE (low), bias);
+ tree tbias = wide_int_to_tree (TREE_TYPE (ret), bias);
if (totallowp)
{
*totallowp = tbias;
- exp = TREE_OPERAND (exp, 0);
- STRIP_NOPS (exp);
- return exp;
+ return ret;
}
else if (!tree_int_cst_lt (totallow, tbias))
return NULL_TREE;
+ bias = wi::to_widest (tbias);
bias -= wi::to_widest (totallow);
if (wi::ges_p (bias, 0) && wi::lts_p (bias, prec - max))
{
*mask = wi::lshift (*mask, bias);
- exp = TREE_OPERAND (exp, 0);
- STRIP_NOPS (exp);
- return exp;
+ return ret;
}
}
}
--- gcc/testsuite/gcc.c-torture/execute/pr65418-1.c.jj 2015-03-13 16:49:07.973604649 +0100
+++ gcc/testsuite/gcc.c-torture/execute/pr65418-1.c 2015-03-13 16:48:28.000000000 +0100
@@ -0,0 +1,19 @@
+/* PR tree-optimization/65418 */
+
+__attribute__((noinline, noclone)) int
+foo (int x)
+{
+ if (x == -216 || x == -132 || x == -218 || x == -146)
+ return 1;
+ return 0;
+}
+
+int
+main ()
+{
+ volatile int i;
+ for (i = -230; i < -120; i++)
+ if (foo (i) != (i == -216 || i == -132 || i == -218 || i == -146))
+ __builtin_abort ();
+ return 0;
+}
--- gcc/testsuite/gcc.c-torture/execute/pr65418-2.c.jj 2015-03-13 16:49:10.992556110 +0100
+++ gcc/testsuite/gcc.c-torture/execute/pr65418-2.c 2015-03-13 16:48:44.000000000 +0100
@@ -0,0 +1,19 @@
+/* PR tree-optimization/65418 */
+
+__attribute__((noinline, noclone)) int
+foo (int x)
+{
+ if (x == -216 || x == -211 || x == -218 || x == -205 || x == -223)
+ return 1;
+ return 0;
+}
+
+int
+main ()
+{
+ volatile int i;
+ for (i = -230; i < -200; i++)
+ if (foo (i) != (i == -216 || i == -211 || i == -218 || i == -205 || i == -223))
+ __builtin_abort ();
+ return 0;
+}

View File

@ -1 +1 @@
51d8b914dba658c69d23c5f7853f843c gcc-5.0.0-20150313.tar.bz2
2be0ac7eb39c7042b4cb255153a32988 gcc-5.0.0-20150316.tar.bz2