aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-04-12 22:18:39 +0000
committerMike Frysinger <vapier@gentoo.org>2008-04-12 22:18:39 +0000
commit1bc3a76678175dc7a1bac99511989ebbf34dc23f (patch)
tree88887916213f5cc3920d7fb8e84f8b40892b5988
parentinitial 4.3.0 patchset based on last 4.2.3 patchset (diff)
downloadgcc-patches-1bc3a76678175dc7a1bac99511989ebbf34dc23f.tar.gz
gcc-patches-1bc3a76678175dc7a1bac99511989ebbf34dc23f.tar.bz2
gcc-patches-1bc3a76678175dc7a1bac99511989ebbf34dc23f.zip
add some more fixes from upstream
-rw-r--r--4.1.2/gentoo/65_all_gcc-hppa-pr34627.patch23
-rw-r--r--4.2.3/gentoo/56_all_gcc-4-pr32177.patch52
-rw-r--r--4.2.3/gentoo/65_all_gcc-hppa-pr34627.patch23
-rw-r--r--4.2.3/gentoo/README.history4
4 files changed, 102 insertions, 0 deletions
diff --git a/4.1.2/gentoo/65_all_gcc-hppa-pr34627.patch b/4.1.2/gentoo/65_all_gcc-hppa-pr34627.patch
new file mode 100644
index 0000000..da0db33
--- /dev/null
+++ b/4.1.2/gentoo/65_all_gcc-hppa-pr34627.patch
@@ -0,0 +1,23 @@
+http://bugs.gentoo.org/203543
+http://gcc.gnu.org/PR34627
+
+2008-02-08 Steven Bosscher <stevenb.gcc@gmail.com>
+
+ PR middle-end/34627
+ combine.c (simplify_if_then_else): Make sure the comparison is
+ against const0_rtx when simplifying to (abs x) or (neg (abs X)).
+
+--- trunk/gcc/combine.c 2008/02/09 00:17:54 132192
++++ trunk/gcc/combine.c 2008/02/09 00:30:13 132193
+@@ -5393,9 +5393,10 @@
+ /* Look for cases where we have (abs x) or (neg (abs X)). */
+
+ if (GET_MODE_CLASS (mode) == MODE_INT
++ && comparison_p
++ && XEXP (cond, 1) == const0_rtx
+ && GET_CODE (false_rtx) == NEG
+ && rtx_equal_p (true_rtx, XEXP (false_rtx, 0))
+- && comparison_p
+ && rtx_equal_p (true_rtx, XEXP (cond, 0))
+ && ! side_effects_p (true_rtx))
+ switch (true_code)
diff --git a/4.2.3/gentoo/56_all_gcc-4-pr32177.patch b/4.2.3/gentoo/56_all_gcc-4-pr32177.patch
new file mode 100644
index 0000000..2d11f16
--- /dev/null
+++ b/4.2.3/gentoo/56_all_gcc-4-pr32177.patch
@@ -0,0 +1,52 @@
+http://gcc.gnu.org/PR32177
+
+2007-06-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/32177
+ * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
+ on init, the non-decl cond operand and increment value.
+
+--- trunk/gcc/cp/semantics.c 2007/06/07 21:01:41 125543
++++ trunk/gcc/cp/semantics.c 2007/06/07 23:11:23 125544
+@@ -3806,6 +3806,8 @@
+ finish_omp_for (location_t locus, tree decl, tree init, tree cond,
+ tree incr, tree body, tree pre_body)
+ {
++ tree omp_for;
++
+ if (decl == NULL)
+ {
+ if (init != NULL)
+@@ -3883,8 +3885,31 @@
+ add_stmt (pre_body);
+ pre_body = NULL;
+ }
++
++ init = fold_build_cleanup_point_expr (TREE_TYPE (init), init);
+ init = build_modify_expr (decl, NOP_EXPR, init);
+- return c_finish_omp_for (locus, decl, init, cond, incr, body, pre_body);
++ if (cond && TREE_SIDE_EFFECTS (cond) && COMPARISON_CLASS_P (cond))
++ {
++ int n = TREE_SIDE_EFFECTS (TREE_OPERAND (cond, 1)) != 0;
++ tree t = TREE_OPERAND (cond, n);
++
++ TREE_OPERAND (cond, n)
++ = fold_build_cleanup_point_expr (TREE_TYPE (t), t);
++ }
++ omp_for = c_finish_omp_for (locus, decl, init, cond, incr, body, pre_body);
++ if (omp_for != NULL
++ && TREE_CODE (OMP_FOR_INCR (omp_for)) == MODIFY_EXPR
++ && TREE_SIDE_EFFECTS (TREE_OPERAND (OMP_FOR_INCR (omp_for), 1))
++ && BINARY_CLASS_P (TREE_OPERAND (OMP_FOR_INCR (omp_for), 1)))
++ {
++ tree t = TREE_OPERAND (OMP_FOR_INCR (omp_for), 1);
++ int n = TREE_SIDE_EFFECTS (TREE_OPERAND (t, 1)) != 0;
++
++ TREE_OPERAND (t, n)
++ = fold_build_cleanup_point_expr (TREE_TYPE (TREE_OPERAND (t, n)),
++ TREE_OPERAND (t, n));
++ }
++ return omp_for;
+ }
+
+ void
diff --git a/4.2.3/gentoo/65_all_gcc-hppa-pr34627.patch b/4.2.3/gentoo/65_all_gcc-hppa-pr34627.patch
new file mode 100644
index 0000000..da0db33
--- /dev/null
+++ b/4.2.3/gentoo/65_all_gcc-hppa-pr34627.patch
@@ -0,0 +1,23 @@
+http://bugs.gentoo.org/203543
+http://gcc.gnu.org/PR34627
+
+2008-02-08 Steven Bosscher <stevenb.gcc@gmail.com>
+
+ PR middle-end/34627
+ combine.c (simplify_if_then_else): Make sure the comparison is
+ against const0_rtx when simplifying to (abs x) or (neg (abs X)).
+
+--- trunk/gcc/combine.c 2008/02/09 00:17:54 132192
++++ trunk/gcc/combine.c 2008/02/09 00:30:13 132193
+@@ -5393,9 +5393,10 @@
+ /* Look for cases where we have (abs x) or (neg (abs X)). */
+
+ if (GET_MODE_CLASS (mode) == MODE_INT
++ && comparison_p
++ && XEXP (cond, 1) == const0_rtx
+ && GET_CODE (false_rtx) == NEG
+ && rtx_equal_p (true_rtx, XEXP (false_rtx, 0))
+- && comparison_p
+ && rtx_equal_p (true_rtx, XEXP (cond, 0))
+ && ! side_effects_p (true_rtx))
+ switch (true_code)
diff --git a/4.2.3/gentoo/README.history b/4.2.3/gentoo/README.history
index b8a522a..c64e298 100644
--- a/4.2.3/gentoo/README.history
+++ b/4.2.3/gentoo/README.history
@@ -1,3 +1,7 @@
+1.1 [pending]
+ + 56_all_gcc-4-pr32177.patch
+ + 65_all_gcc-hppa-pr34627.patch
+
1.0 16.02.2008
+ 00_all_gcc-4.1-alpha-mieee-default.patch
+ 00_all_gcc-trampolinewarn.patch