aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/gimple-ssa-store-merging.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/gimple-ssa-store-merging.c b/gcc/gimple-ssa-store-merging.c
index 2894205f..2ab51e2 100644
--- a/gcc/gimple-ssa-store-merging.c
+++ b/gcc/gimple-ssa-store-merging.c
@@ -873,6 +873,8 @@ find_bswap_or_nop (gimple *stmt, struct symbolic_number *n, bool *bswap)
if (sz != 16 && sz != 32 && sz != 64)
return NULL;
tree rhs = gimple_assign_rhs1 (stmt);
+ if (CONSTRUCTOR_NELTS (rhs) == 0)
+ return NULL;
tree eltype = TREE_TYPE (TREE_TYPE (rhs));
unsigned HOST_WIDE_INT eltsz
= int_size_in_bytes (eltype) * BITS_PER_UNIT;