summaryrefslogtreecommitdiff
path: root/packages/gcc/gcc-4.2.2/pr34130.patch
diff options
context:
space:
mode:
authorSergey Lapin <slapinid@gmail.com>2007-12-01 03:30:21 +0000
committerSergey Lapin <slapinid@gmail.com>2007-12-01 03:30:21 +0000
commit58788b6dee8522b73c315998783e29e7c915130d (patch)
tree61814e633f44a097711be04c1015101c4f1a3ac9 /packages/gcc/gcc-4.2.2/pr34130.patch
parent00a5e8de5a0fe2c557405145a13190bbb97e365c (diff)
parent7ad5931818a2296eb5398e031fa1eb2ea4d0f0db (diff)
merge of '411648a693b0891df1f4d2e407cb14d3641cde2a'
and '71df4f75a1331353855f0e6a93d2e806439e90b3'
Diffstat (limited to 'packages/gcc/gcc-4.2.2/pr34130.patch')
-rw-r--r--packages/gcc/gcc-4.2.2/pr34130.patch16
1 files changed, 16 insertions, 0 deletions
diff --git a/packages/gcc/gcc-4.2.2/pr34130.patch b/packages/gcc/gcc-4.2.2/pr34130.patch
new file mode 100644
index 0000000000..415335f4b4
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/pr34130.patch
@@ -0,0 +1,16 @@
+Index: gcc-4.1.2/gcc/fold-const.c
+===================================================================
+--- gcc-4.1.2.orig/gcc/fold-const.c 2007-11-21 18:53:42.000000000 +0100
++++ gcc-4.1.2/gcc/fold-const.c 2007-11-21 18:56:26.000000000 +0100
+@@ -5339,7 +5339,10 @@
+ }
+ break;
+ }
+- /* FALLTHROUGH */
++ /* If the constant is negative, we cannot simplify this. */
++ if (tree_int_cst_sgn (c) == -1)
++ break;
++ /* FALLTHROUGH */
+ case NEGATE_EXPR:
+ if ((t1 = extract_muldiv (op0, c, code, wide_type)) != 0)
+ return fold_build1 (tcode, ctype, fold_convert (ctype, t1));