summaryrefslogtreecommitdiff
path: root/debian/patches/linaro-issue2575.diff
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/linaro-issue2575.diff')
-rw-r--r--debian/patches/linaro-issue2575.diff16
1 files changed, 16 insertions, 0 deletions
diff --git a/debian/patches/linaro-issue2575.diff b/debian/patches/linaro-issue2575.diff
new file mode 100644
index 0000000..97bf780
--- /dev/null
+++ b/debian/patches/linaro-issue2575.diff
@@ -0,0 +1,16 @@
+# DP: Fix ICE in tree_to_shwi, Linaro issue #2575.
+
+--- a/src/gcc/varasm.c
++++ b/src/gcc/varasm.c
+@@ -6777,8 +6777,9 @@
+ anchor range to reduce the amount of instructions require to refer
+ to the entire declaration. */
+ if (decl && DECL_SIZE (decl)
+- && tree_to_shwi (DECL_SIZE (decl))
+- >= (targetm.max_anchor_offset * BITS_PER_UNIT))
++ && (!tree_fits_shwi_p (DECL_SIZE (decl))
++ || tree_to_shwi (DECL_SIZE (decl))
++ >= (targetm.max_anchor_offset * BITS_PER_UNIT)))
+ return false;
+
+ }