This commit is contained in:
Jakub Jelinek 2013-08-29 16:33:10 +02:00
parent f1ba2f493a
commit d747bb409f
2 changed files with 15 additions and 132 deletions

View File

@ -1,9 +1,9 @@
%global DATE 20130814 %global DATE 20130829
%global SVNREV 201733 %global SVNREV 202076
%global gcc_version 4.8.1 %global gcc_version 4.8.1
# 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 6 %global gcc_release 7
%global _unpackaged_files_terminate_build 0 %global _unpackaged_files_terminate_build 0
%global multilib_64_archs sparc64 ppc64 s390x x86_64 %global multilib_64_archs sparc64 ppc64 s390x x86_64
%ifarch %{ix86} x86_64 ia64 ppc ppc64 alpha %ifarch %{ix86} x86_64 ia64 ppc ppc64 alpha
@ -195,7 +195,6 @@ Patch11: gcc48-libstdc++-docs.patch
Patch12: gcc48-no-add-needed.patch Patch12: gcc48-no-add-needed.patch
Patch13: gcc48-pr56564.patch Patch13: gcc48-pr56564.patch
Patch14: gcc48-pr56493.patch Patch14: gcc48-pr56493.patch
Patch15: gcc48-pr58145.patch
Patch1000: fastjar-0.97-segfault.patch Patch1000: fastjar-0.97-segfault.patch
Patch1001: fastjar-0.97-len1.patch Patch1001: fastjar-0.97-len1.patch
@ -751,7 +750,6 @@ package or when debugging this package.
%patch12 -p0 -b .no-add-needed~ %patch12 -p0 -b .no-add-needed~
%patch13 -p0 -b .pr56564~ %patch13 -p0 -b .pr56564~
%patch14 -p0 -b .pr56493~ %patch14 -p0 -b .pr56493~
%patch15 -p0 -b .pr58145~
%if 0%{?_enable_debug_packages} %if 0%{?_enable_debug_packages}
cat > split-debuginfo.sh <<\EOF cat > split-debuginfo.sh <<\EOF
@ -3000,6 +2998,18 @@ fi
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/plugin %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/plugin
%changelog %changelog
* Thu Aug 29 2013 Jakub Jelinek <jakub@redhat.com> 4.8.1-7
- update from the 4.8 branch
- PRs c++/58083, c++/58119, c++/58190, fortran/57798, fortran/58185,
middle-end/56977, middle-end/57381, middle-end/58257, target/56979,
target/57865, target/57927, target/58218, tree-optimization/57343,
tree-optimization/57396, tree-optimization/57417,
tree-optimization/58006, tree-optimization/58164,
tree-optimization/58165, tree-optimization/58209
- fix up x86-64 -mcmodel=large -fpic TLS GD and LD model
(#994244, PR target/58067)
- power8 fusion support fixes (#731884, PR target/58160)
* Wed Aug 14 2013 Jakub Jelinek <jakub@redhat.com> 4.8.1-6 * Wed Aug 14 2013 Jakub Jelinek <jakub@redhat.com> 4.8.1-6
- update from the 4.8 branch - update from the 4.8 branch
- PRs c++/57825, c++/57901, c++/57981, c++/58022, fortran/57435, - PRs c++/57825, c++/57901, c++/57981, c++/58022, fortran/57435,

View File

@ -1,127 +0,0 @@
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" } } */