* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118747
138bc75d-0d04-0410-961f-
82ee72b054a4
+2006-11-12 Jason Merrill <jason@redhat.com>
+ Andrew Pinski <pinskia@physics.uc.edu>
+
+ 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.
+
2006-11-12 Kaz Kojima <kkojima@gcc.gnu.org>
* genemit.c (gen_insn): Call gen_exp with a non-null used
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);
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
--- /dev/null
+/* PR middle-end/28915 */
+/* { dg-options "-msse -O2 -ftree-vectorize -fdump-tree-vect" } */
+
+extern char lanip[3][40];
+typedef struct
+{
+ char *t[4];
+}tx_typ;
+
+int set_names (void)
+{
+ static tx_typ tt1;
+ int ln;
+ for (ln = 0; ln < 4; ln++)
+ tt1.t[ln] = lanip[1];
+}
+
+/* { dg-final { scan-tree-dump "vect_cst" "vect" } } */
CHECK_OP (1, "invalid operand to binary operator");
break;
+ case CONSTRUCTOR:
+ if (TREE_CONSTANT (t) && TREE_CODE (TREE_TYPE (t)) == VECTOR_TYPE)
+ *walk_subtrees = 0;
+ break;
+
default:
break;
}
{
tree value = TREE_VALUE (link);
+ /* Don't crash if we get an address constant. */
+ if (!CONSTANT_CLASS_P (value))
+ continue;
+
over1 |= TREE_OVERFLOW (value);
over2 |= TREE_CONSTANT_OVERFLOW (value);
}