Message ID | 20201219114942.GR3788@tucnak |
---|---|
State | New |
Headers | show |
Series | [committed] bswap: Fix up a thinko with empty CONSTRUCTORs [PR98378] | expand |
--- gcc/gimple-ssa-store-merging.c.jj 2020-12-16 16:14:44.000000000 +0100 +++ gcc/gimple-ssa-store-merging.c 2020-12-18 23:12:59.671282002 +0100 @@ -873,6 +873,8 @@ find_bswap_or_nop (gimple *stmt, struct 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;