aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2006-11-13 03:16:11 -0500
committerJason Merrill <jason@gcc.gnu.org>2006-11-13 03:16:11 -0500
commit84816907e4bda26eb7a21a5d3d52eb876fcd91dd (patch)
tree37477647bbdc97991564bdf0325c20fe633a4896 /gcc/gimplify.c
parent329b3cc384733e2f4df34f31b32600787398c798 (diff)
downloadgcc-84816907e4bda26eb7a21a5d3d52eb876fcd91dd.zip
gcc-84816907e4bda26eb7a21a5d3d52eb876fcd91dd.tar.gz
gcc-84816907e4bda26eb7a21a5d3d52eb876fcd91dd.tar.bz2
re PR middle-end/28915 (ICE: tree check: expected class 'constant', have 'declaration' (var_decl) in build_vector, at tree.c:973)
PR middle-end/28915 * gimplify.c (gimplify_init_constructor): Don't reduce TREE_CONSTANT vector ctors. * tree-cfg.c (verify_expr): Don't look into TREE_CONSTANT vector ctors. * expmed.c (make_tree): Handle CONST, SYMBOL_REF. * tree.c (build_vector): Handle non-_CST elements. Co-Authored-By: Andrew Pinski <pinskia@physics.uc.edu> From-SVN: r118747
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 4e5d609..13c5f48 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -3161,6 +3161,11 @@ gimplify_init_constructor (tree *expr_p, tree *pre_p,
TREE_OPERAND (*expr_p, 1) = build_vector_from_ctor (type, elts);
break;
}
+
+ /* Don't reduce a TREE_CONSTANT vector ctor even if we can't
+ make a VECTOR_CST. It won't do anything for us, and it'll
+ prevent us from representing it as a single constant. */
+ break;
}
/* Vector types use CONSTRUCTOR all the way through gimple