blob: 97bf780e2673a1ee57541b7b912730845a06118d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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;
}
|