aboutsummaryrefslogtreecommitdiff
path: root/gcc/expmed.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/expmed.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/expmed.c')
-rw-r--r--gcc/expmed.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c
index b044780..6a0d353 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -5044,6 +5044,15 @@ make_tree (tree type, rtx x)
GET_CODE (x) == ZERO_EXTEND);
return fold_convert (type, make_tree (t, XEXP (x, 0)));
+ case CONST:
+ return make_tree (type, XEXP (x, 0));
+
+ case SYMBOL_REF:
+ t = SYMBOL_REF_DECL (x);
+ if (t)
+ return fold_convert (type, build_fold_addr_expr (t));
+ /* else fall through. */
+
default:
t = build_decl (VAR_DECL, NULL_TREE, type);