diff options
Diffstat (limited to 'gcc/tree-ssa-sccvn.c')
-rw-r--r-- | gcc/tree-ssa-sccvn.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c index e417a1536ef..46ce285d9c7 100644 --- a/gcc/tree-ssa-sccvn.c +++ b/gcc/tree-ssa-sccvn.c @@ -1352,7 +1352,11 @@ fully_constant_vn_reference_p (vn_reference_t ref) || TYPE_PRECISION (ref->type) % BITS_PER_UNIT == 0)) { HOST_WIDE_INT off = 0; - HOST_WIDE_INT size = TYPE_PRECISION (ref->type); + HOST_WIDE_INT size; + if (INTEGRAL_TYPE_P (ref->type)) + size = TYPE_PRECISION (ref->type); + else + size = tree_to_shwi (TYPE_SIZE (ref->type)); if (size % BITS_PER_UNIT != 0 || size > MAX_BITSIZE_MODE_ANY_MODE) return NULL_TREE; |