aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2012-10-02 15:43:09 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2012-10-02 15:43:09 +0200
commit13396b6e4da82e926e666e07fae9186825de65e8 (patch)
tree3adb3336c25f30bb07febeff1971bf93fbfcc921 /gcc/expr.c
parentfaf86a02f349e39c74949b49a1b95bd8a1f99ceb (diff)
downloadgcc-13396b6e4da82e926e666e07fae9186825de65e8.zip
gcc-13396b6e4da82e926e666e07fae9186825de65e8.tar.gz
gcc-13396b6e4da82e926e666e07fae9186825de65e8.tar.bz2
re PR tree-optimization/54713 (error: non-trivial conversion at assignment in gcc.c-torture/compile/pr53410-2.c)
PR tree-optimization/54713 * expr.c (categorize_ctor_elements_1): Don't assume purpose is non-NULL. * tree-cfg.c (verify_gimple_assign_single): Add verification of vector CONSTRUCTORs. * tree-ssa-sccvn.c (vn_reference_lookup_3): For VECTOR_TYPE CONSTRUCTORs, don't do anything if element type is VECTOR_TYPE, and don't check index. * tree-vect-slp.c (vect_get_constant_vectors): VIEW_CONVERT_EXPR ctor elements first if their type isn't compatible with vector element type. From-SVN: r191983
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index c180e8d..1adea93 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -5491,7 +5491,7 @@ categorize_ctor_elements_1 (const_tree ctor, HOST_WIDE_INT *p_nz_elts,
{
HOST_WIDE_INT mult = 1;
- if (TREE_CODE (purpose) == RANGE_EXPR)
+ if (purpose && TREE_CODE (purpose) == RANGE_EXPR)
{
tree lo_index = TREE_OPERAND (purpose, 0);
tree hi_index = TREE_OPERAND (purpose, 1);