This commit is contained in:
Jakub Jelinek 2013-08-14 20:17:54 +02:00
parent 7c9911eee8
commit f1ba2f493a
5 changed files with 221 additions and 19 deletions

1
.gitignore vendored
View File

@ -80,3 +80,4 @@
/gcc-4.8.1-20130628.tar.bz2
/gcc-4.8.1-20130715.tar.bz2
/gcc-4.8.1-20130717.tar.bz2
/gcc-4.8.1-20130814.tar.bz2

View File

@ -1,9 +1,9 @@
%global DATE 20130717
%global SVNREV 201013
%global DATE 20130814
%global SVNREV 201733
%global gcc_version 4.8.1
# 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 5
%global gcc_release 6
%global _unpackaged_files_terminate_build 0
%global multilib_64_archs sparc64 ppc64 s390x x86_64
%ifarch %{ix86} x86_64 ia64 ppc ppc64 alpha
@ -69,7 +69,7 @@
Summary: Various compilers (C, C++, Objective-C, Java, ...)
Name: gcc
Version: %{gcc_version}
Release: %{gcc_release}%{?dist}.1
Release: %{gcc_release}%{?dist}
# libgcc, libgfortran, libmudflap, libgomp, libstdc++ and crtstuff have
# GCC Runtime Exception.
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
@ -195,6 +195,7 @@ Patch11: gcc48-libstdc++-docs.patch
Patch12: gcc48-no-add-needed.patch
Patch13: gcc48-pr56564.patch
Patch14: gcc48-pr56493.patch
Patch15: gcc48-pr58145.patch
Patch1000: fastjar-0.97-segfault.patch
Patch1001: fastjar-0.97-len1.patch
@ -750,6 +751,7 @@ package or when debugging this package.
%patch12 -p0 -b .no-add-needed~
%patch13 -p0 -b .pr56564~
%patch14 -p0 -b .pr56493~
%patch15 -p0 -b .pr58145~
%if 0%{?_enable_debug_packages}
cat > split-debuginfo.sh <<\EOF
@ -2998,8 +3000,16 @@ fi
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/plugin
%changelog
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.8.1-5.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Wed Aug 14 2013 Jakub Jelinek <jakub@redhat.com> 4.8.1-6
- update from the 4.8 branch
- PRs c++/57825, c++/57901, c++/57981, c++/58022, fortran/57435,
fortran/58058, libstdc++/56627, libstdc++/57914, libstdc++/58098,
middle-end/58041, rtl-optimization/57459, rtl-optimization/57708,
rtl-optimization/57878, sanitizer/56417, target/51784, target/57516,
target/58067, target/58132, tree-optimization/57980
- power8 fusion support (#731884)
- fix up ABI alignment patch (#947197)
- fix up SRA with volatile struct accesses (PR tree-optimization/58145)
* Wed Jul 17 2013 Jakub Jelinek <jakub@redhat.com> 4.8.1-5
- update from the 4.8 branch

View File

@ -1,3 +1,22 @@
2013-06-19 Igor Zamyatin <igor.zamyatin@intel.com>
* gcc.dg/tree-ssa/loop-19.c: Add -fno-common.
2013-06-12 Jakub Jelinek <jakub@redhat.com>
PR target/56564
* varasm.c (decl_binds_to_current_def_p): Call binds_local_p
target hook even for !TREE_PUBLIC decls. If no resolution info
is available, return false for common and external decls.
* gcc.target/i386/pr56564-1.c: Skip on darwin, mingw and cygwin.
* gcc.target/i386/pr56564-3.c: Likewise.
2013-06-11 Jakub Jelinek <jakub@redhat.com>
PR target/56564
* varasm.c (get_variable_align): Move #endif to the right place.
2013-06-10 Jakub Jelinek <jakub@redhat.com>
PR target/56564
@ -78,7 +97,7 @@
If defined, a C expression to compute the alignment given to a constant
that is being placed in memory. @var{constant} is the constant and
--- gcc/varasm.c (revision 199897)
+++ gcc/varasm.c (revision 199898)
+++ gcc/varasm.c (revision 199984)
@@ -966,13 +966,80 @@ align_variable (tree decl, bool dont_out
align = MAX_OFILE_ALIGNMENT;
}
@ -162,13 +181,9 @@
if (! DECL_THREAD_LOCAL_P (decl) || data_align <= BITS_PER_WORD)
align = data_align;
#endif
@@ -986,12 +1053,10 @@ align_variable (tree decl, bool dont_out
if (! DECL_THREAD_LOCAL_P (decl) || const_align <= BITS_PER_WORD)
align = const_align;
}
-#endif
@@ -989,9 +1056,7 @@ align_variable (tree decl, bool dont_out
#endif
}
+#endif
- /* Reset the alignment in case we have made it tighter, so we can benefit
- from it in get_pointer_alignment. */
@ -272,7 +287,43 @@
assemble_variable_contents (decl, name, dont_output_data);
if (asan_protected)
{
@@ -6959,7 +7031,7 @@ place_block_symbol (rtx symbol)
@@ -6709,10 +6781,10 @@ bool
decl_binds_to_current_def_p (tree decl)
{
gcc_assert (DECL_P (decl));
- if (!TREE_PUBLIC (decl))
- return true;
if (!targetm.binds_local_p (decl))
return false;
+ if (!TREE_PUBLIC (decl))
+ return true;
/* When resolution is available, just use it. */
if (TREE_CODE (decl) == VAR_DECL
&& (TREE_STATIC (decl) || DECL_EXTERNAL (decl)))
@@ -6730,10 +6802,20 @@ decl_binds_to_current_def_p (tree decl)
return resolution_to_local_definition_p (node->symbol.resolution);
}
/* Otherwise we have to assume the worst for DECL_WEAK (hidden weaks
- binds locally but still can be overwritten).
+ binds locally but still can be overwritten), DECL_COMMON (can be merged
+ with a non-common definition somewhere in the same module) or
+ DECL_EXTERNAL.
This rely on fact that binds_local_p behave as decl_replaceable_p
for all other declaration types. */
- return !DECL_WEAK (decl);
+ if (DECL_WEAK (decl))
+ return false;
+ if (DECL_COMMON (decl)
+ && (DECL_INITIAL (decl) == NULL
+ || DECL_INITIAL (decl) == error_mark_node))
+ return false;
+ if (DECL_EXTERNAL (decl))
+ return false;
+ return true;
}
/* A replaceable function or variable is one which may be replaced
@@ -6959,7 +7041,7 @@ place_block_symbol (rtx symbol)
else
{
decl = SYMBOL_REF_DECL (symbol);
@ -454,10 +505,11 @@
#define N 1024
--- gcc/testsuite/gcc.target/i386/pr56564-1.c (revision 0)
+++ gcc/testsuite/gcc.target/i386/pr56564-1.c (revision 199898)
@@ -0,0 +1,25 @@
+++ gcc/testsuite/gcc.target/i386/pr56564-1.c (revision 199985)
@@ -0,0 +1,26 @@
+/* PR target/56564 */
+/* { dg-do compile { target { fpic && lp64 } } } */
+/* { dg-skip-if "No symbol interposition for PIC" { *-*-mingw* *-*-cygwin* *-*-darwin* } } */
+/* { dg-options "-O3 -fpic -fdump-tree-optimized" } */
+
+struct S { long a, b; } s = { 5, 6 };
@ -510,10 +562,11 @@
+/* { dg-final { scan-assembler ".align\[ \t]*16\[^:]*\[\n\r]t:" { target { *-*-linux* } } } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
--- gcc/testsuite/gcc.target/i386/pr56564-3.c (revision 0)
+++ gcc/testsuite/gcc.target/i386/pr56564-3.c (revision 199898)
@@ -0,0 +1,28 @@
+++ gcc/testsuite/gcc.target/i386/pr56564-3.c (revision 199985)
@@ -0,0 +1,29 @@
+/* PR target/56564 */
+/* { dg-do compile { target { fpic && lp64 } } } */
+/* { dg-skip-if "No symbol interposition for PIC" { *-*-mingw* *-*-cygwin* *-*-darwin* } } */
+/* { dg-options "-O3 -fpic -fdump-tree-optimized" } */
+
+__thread struct S { long a, b; } s = { 5, 6 };
@ -587,3 +640,14 @@
int main1 ()
{
--- gcc/testsuite/gcc.dg/tree-ssa/loop-19.c (revision 200212)
+++ gcc/testsuite/gcc.dg/tree-ssa/loop-19.c (revision 200213)
@@ -6,7 +6,7 @@
/* { dg-do compile { target { i?86-*-* || { x86_64-*-* || powerpc_hard_double } } } } */
/* { dg-require-effective-target nonpic } */
-/* { dg-options "-O3 -fno-tree-loop-distribute-patterns -fno-prefetch-loop-arrays -fdump-tree-optimized" } */
+/* { dg-options "-O3 -fno-tree-loop-distribute-patterns -fno-prefetch-loop-arrays -fdump-tree-optimized -fno-common" } */
# define N 2000000
double a[N],c[N];

127
gcc48-pr58145.patch Normal file
View File

@ -0,0 +1,127 @@
2013-08-14 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/58145
* tree-sra.c (build_ref_for_offset): If prev_base has
TREE_THIS_VOLATILE or TREE_SIDE_EFFECTS, propagate it to MEM_REF.
* gcc.dg/pr58145-1.c: New test.
* gcc.dg/pr58145-2.c: New test.
--- gcc/tree-sra.c.jj 2013-08-14 11:02:55.290711106 +0200
+++ gcc/tree-sra.c 2013-08-14 12:38:47.405230042 +0200
@@ -1466,6 +1466,7 @@ build_ref_for_offset (location_t loc, tr
{
tree prev_base = base;
tree off;
+ tree mem_ref;
HOST_WIDE_INT base_offset;
unsigned HOST_WIDE_INT misalign;
unsigned int align;
@@ -1516,7 +1517,12 @@ build_ref_for_offset (location_t loc, tr
if (align < TYPE_ALIGN (exp_type))
exp_type = build_aligned_type (exp_type, align);
- return fold_build2_loc (loc, MEM_REF, exp_type, base, off);
+ mem_ref = fold_build2_loc (loc, MEM_REF, exp_type, base, off);
+ if (TREE_THIS_VOLATILE (prev_base))
+ TREE_THIS_VOLATILE (mem_ref) = 1;
+ if (TREE_SIDE_EFFECTS (prev_base))
+ TREE_SIDE_EFFECTS (mem_ref) = 1;
+ return mem_ref;
}
/* Construct a memory reference to a part of an aggregate BASE at the given
--- gcc/testsuite/gcc.dg/pr58145-1.c.jj 2013-08-14 12:02:07.077086488 +0200
+++ gcc/testsuite/gcc.dg/pr58145-1.c 2013-08-14 12:03:15.895198976 +0200
@@ -0,0 +1,37 @@
+/* PR tree-optimization/58145 */
+/* { dg-do compile { target { int32plus } } } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+struct S { unsigned int data : 32; };
+struct T { unsigned int data; };
+volatile struct S s2;
+
+void
+f1 (int val)
+{
+ struct S s = { .data = val };
+ *(volatile struct S *) 0x880000UL = s;
+}
+
+void
+f2 (int val)
+{
+ struct T t = { .data = val };
+ *(volatile struct T *) 0x880000UL = t;
+}
+
+void
+f3 (int val)
+{
+ *(volatile unsigned int *) 0x880000UL = val;
+}
+
+void
+f4 (int val)
+{
+ struct S s = { .data = val };
+ s2 = s;
+}
+
+/* { dg-final { scan-tree-dump-times " ={v} " 4 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
--- gcc/testsuite/gcc.dg/pr58145-2.c.jj 2013-08-14 12:02:28.409663559 +0200
+++ gcc/testsuite/gcc.dg/pr58145-2.c 2013-08-14 12:04:19.471612107 +0200
@@ -0,0 +1,51 @@
+/* PR tree-optimization/58145 */
+/* { dg-do compile { target { int32plus } } } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+struct S { unsigned int data : 32; };
+struct T { unsigned int data; };
+volatile struct S s2;
+
+static inline void
+f1 (int val)
+{
+ struct S s = { .data = val };
+ *(volatile struct S *) 0x880000UL = s;
+}
+
+static inline void
+f2 (int val)
+{
+ struct T t = { .data = val };
+ *(volatile struct T *) 0x880000UL = t;
+}
+
+static inline void
+f3 (int val)
+{
+ *(volatile unsigned int *) 0x880000UL = val;
+}
+
+static inline void
+f4 (int val)
+{
+ struct S s = { .data = val };
+ s2 = s;
+}
+
+void
+f5 (void)
+{
+ int i;
+ for (i = 0; i < 100; i++)
+ f1 (0);
+ for (i = 0; i < 100; i++)
+ f2 (0);
+ for (i = 0; i < 100; i++)
+ f3 (0);
+ for (i = 0; i < 100; i++)
+ f4 (0);
+}
+
+/* { dg-final { scan-tree-dump-times " ={v} " 4 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */

View File

@ -1,4 +1,4 @@
be78a47bd82523250eb3e91646db5b3d cloog-0.18.0.tar.gz
2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz
a48be82c4bd5c9edab399bc7576d56ee gcc-4.8.1-20130717.tar.bz2
a267f248ac69a81c5610138675c2721c gcc-4.8.1-20130814.tar.bz2
bce1586384d8635a76d2f017fb067cd2 isl-0.11.1.tar.bz2