diff options
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/tree.c | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4198461..be2fac7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2019-11-18 Richard Sandiford <richard.sandiford@arm.com> + * tree.c (build_vector_from_ctor): Directly return a zero vector for + empty constructors. + +2019-11-18 Richard Sandiford <richard.sandiford@arm.com> + * cse.c (cse_insn): Delete no-op register moves too. * simplify-rtx.c (comparison_to_mask): Handle unsigned comparisons. Take a second comparison to control the value for NE. @@ -1858,6 +1858,9 @@ make_vector (unsigned log2_npatterns, tree build_vector_from_ctor (tree type, vec<constructor_elt, va_gc> *v) { + if (vec_safe_length (v) == 0) + return build_zero_cst (type); + unsigned HOST_WIDE_INT idx, nelts; tree value; |