aboutsummaryrefslogtreecommitdiff
path: root/4.1.1
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-01-07 12:44:35 +0000
committerMike Frysinger <vapier@gentoo.org>2007-01-07 12:44:35 +0000
commit3614d386423bd6ca91d831492e76add97391d24f (patch)
tree9920d4f3f5eef0600510a5403e8a1592e482e863 /4.1.1
parentold (diff)
downloadgcc-patches-3614d386423bd6ca91d831492e76add97391d24f.tar.gz
gcc-patches-3614d386423bd6ca91d831492e76add97391d24f.tar.bz2
gcc-patches-3614d386423bd6ca91d831492e76add97391d24f.zip
fix from upstream for #136309 / #137376
Diffstat (limited to '4.1.1')
-rw-r--r--4.1.1/gentoo/45_all_gcc4-pr27830.patch18
-rw-r--r--4.1.1/gentoo/46_all_gcc4-pr28116.patch25
2 files changed, 43 insertions, 0 deletions
diff --git a/4.1.1/gentoo/45_all_gcc4-pr27830.patch b/4.1.1/gentoo/45_all_gcc4-pr27830.patch
new file mode 100644
index 0000000..af21b04
--- /dev/null
+++ b/4.1.1/gentoo/45_all_gcc4-pr27830.patch
@@ -0,0 +1,18 @@
+http://gcc.gnu.org/PR27830
+
+--- branches/gcc-4_1-branch/gcc/tree-inline.c 2006/06/16 10:35:28 114715
++++ branches/gcc-4_1-branch/gcc/tree-inline.c 2006/06/16 12:03:24 114716
+@@ -709,7 +709,12 @@
+ else if (TREE_CODE (*tp) == ADDR_EXPR)
+ {
+ walk_tree (&TREE_OPERAND (*tp, 0), copy_body_r, id, NULL);
+- recompute_tree_invarant_for_addr_expr (*tp);
++ /* Handle the case where we substituted an INDIRECT_REF
++ into the operand of the ADDR_EXPR. */
++ if (TREE_CODE (TREE_OPERAND (*tp, 0)) == INDIRECT_REF)
++ *tp = TREE_OPERAND (TREE_OPERAND (*tp, 0), 0);
++ else
++ recompute_tree_invarant_for_addr_expr (*tp);
+ *walk_subtrees = 0;
+ }
+ }
diff --git a/4.1.1/gentoo/46_all_gcc4-pr28116.patch b/4.1.1/gentoo/46_all_gcc4-pr28116.patch
new file mode 100644
index 0000000..de604d9
--- /dev/null
+++ b/4.1.1/gentoo/46_all_gcc4-pr28116.patch
@@ -0,0 +1,25 @@
+http://bugs.gentoo.org/136309
+http://bugs.gentoo.org/137376
+http://gcc.gnu.org/PR28116
+
+2007-01-05 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/28116
+ * tree-inline.c (copy_body_r): Mark argument of ADDR_EXPR
+ addressable.
+
+--- branches/gcc-4_1-branch/gcc/tree-inline.c 2007/01/05 13:49:33 120479
++++ branches/gcc-4_1-branch/gcc/tree-inline.c 2007/01/05 13:53:45 120480
+@@ -714,7 +714,11 @@
+ if (TREE_CODE (TREE_OPERAND (*tp, 0)) == INDIRECT_REF)
+ *tp = TREE_OPERAND (TREE_OPERAND (*tp, 0), 0);
+ else
+- recompute_tree_invarant_for_addr_expr (*tp);
++ {
++ recompute_tree_invarant_for_addr_expr (*tp);
++ if (DECL_P (TREE_OPERAND (*tp, 0)))
++ TREE_ADDRESSABLE (TREE_OPERAND (*tp, 0)) = 1;
++ }
+ *walk_subtrees = 0;
+ }
+ }