aboutsummaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 6a7ffc2..1c711b1 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -6804,11 +6804,12 @@ default_use_anchors_for_symbol_p (const_rtx symbol)
return false;
/* Don't use section anchors for decls that won't fit inside a single
- anchor range to reduce the amount of instructions require to refer
+ anchor range to reduce the amount of instructions required to refer
to the entire declaration. */
- if (decl && DECL_SIZE (decl)
- && tree_to_shwi (DECL_SIZE (decl))
- >= (targetm.max_anchor_offset * BITS_PER_UNIT))
+ if (DECL_SIZE_UNIT (decl) == NULL_TREE
+ || !tree_fits_uhwi_p (DECL_SIZE_UNIT (decl))
+ || (tree_to_uhwi (DECL_SIZE_UNIT (decl))
+ >= (unsigned HOST_WIDE_INT) targetm.max_anchor_offset))
return false;
}