aboutsummaryrefslogtreecommitdiff
path: root/4.5.2
diff options
context:
space:
mode:
authorRyan Hill <rhill@gentoo.org>2010-12-26 05:08:24 +0000
committerRyan Hill <rhill@gentoo.org>2010-12-26 05:08:24 +0000
commitfada411d51e9113be4cae6a3d52d417ab9eef4f2 (patch)
tree1ec30937b6ea196af7ee8f2719d6c33b750812bd /4.5.2
parentAdd new 4.5.2 patchset based on last 4.5.1 patchset. Rename piepatch directo... (diff)
downloadgcc-patches-fada411d51e9113be4cae6a3d52d417ab9eef4f2.tar.gz
gcc-patches-fada411d51e9113be4cae6a3d52d417ab9eef4f2.tar.bz2
gcc-patches-fada411d51e9113be4cae6a3d52d417ab9eef4f2.zip
Add upstream patch for bug #346845.
Diffstat (limited to '4.5.2')
-rw-r--r--4.5.2/gentoo/20_all_4.5.2_pr46734_ICE.patch56
-rw-r--r--4.5.2/gentoo/README.history1
2 files changed, 57 insertions, 0 deletions
diff --git a/4.5.2/gentoo/20_all_4.5.2_pr46734_ICE.patch b/4.5.2/gentoo/20_all_4.5.2_pr46734_ICE.patch
new file mode 100644
index 0000000..6d92b89
--- /dev/null
+++ b/4.5.2/gentoo/20_all_4.5.2_pr46734_ICE.patch
@@ -0,0 +1,56 @@
+[4.5 Regression] ICE in create_tmp_var, at gimplify.c:505
+
+http://gcc.gnu.org/PR46734
+https://bugs.gentoo.org/346845
+
+--- gcc/testsuite/g++.dg/tree-ssa/pr46734.C
++++ gcc/testsuite/g++.dg/tree-ssa/pr46734.C
+@@ -0,0 +1,34 @@
++/* { dg-do compile } */
++/* { dg-options "-O -fipa-sra" } */
++
++struct A
++{
++ int *p;
++ A() {p = (int *) -1;}
++ ~A() {if (p && p != (int *) -1) *p = 0;}
++};
++
++struct B
++{
++ A a;
++ char data[23];
++ B() : a() {data[0] = 0;}
++};
++
++extern A ga;
++extern int *gi;
++extern void *gz;
++extern B *gb;
++
++static int * __attribute__ ((noinline)) foo (B *b, void *z)
++{
++ __builtin_memcpy (gz, z, 28);
++ ga = b->a;
++ return b->a.p;
++}
++
++int *bar (B *b, void *z)
++{
++ gb = b;
++ return foo (b, z);
++}
+--- gcc/tree-sra.c
++++ gcc/tree-sra.c
+@@ -3413,7 +3413,10 @@
+ else if (ac2->size != access->size)
+ return NULL;
+
+- if (access_precludes_ipa_sra_p (ac2))
++ if (access_precludes_ipa_sra_p (ac2)
++ || (ac2->type != access->type
++ && (TREE_ADDRESSABLE (ac2->type)
++ || TREE_ADDRESSABLE (access->type))))
+ return NULL;
+
+ modification |= ac2->write;
diff --git a/4.5.2/gentoo/README.history b/4.5.2/gentoo/README.history
index 796dba1..ca8c45a 100644
--- a/4.5.2/gentoo/README.history
+++ b/4.5.2/gentoo/README.history
@@ -9,6 +9,7 @@
+ 11_all_gcc-netbsd-symbolic.patch
+ 14_all_gcc-sparc64-bsd.patch
+ 15_all_gcc-libgomp-no-werror.patch
+ + 20_all_4.5.2_pr46734_ICE.patch
+ 40_all_gcc-4.4-libiberty.h-asprintf.patch
+ 47_all_arm-unbreak-armv4t.patch
+ 51_all_gcc-3.4-libiberty-pic.patch