+2007-10-29 Richard Sandiford <rsandifo@nildram.co.uk>
+
+ PR tree-optimization/33614
+ * gimplify.c (gimplify_init_constructor): Gimplify vector constructors
+ if they can't be reduced to VECTOR_CSTs and aren't legitimate
+ initializer constants.
+
2007-10-29 Richard Guenther <rguenther@suse.de>
PR tree-optimization/33870
tree value;
/* Even when ctor is constant, it might contain non-*_CST
- elements (e.g. { 1.0/0.0 - 1.0/0.0, 0.0 }) and those don't
- belong into VECTOR_CST nodes. */
+ elements, such as addresses or trapping values like
+ 1.0/0.0 - 1.0/0.0. Such expressions don't belong
+ in VECTOR_CST nodes. */
FOR_EACH_CONSTRUCTOR_VALUE (elts, ix, value)
if (!CONSTANT_CLASS_P (value))
{
break;
}
- /* Don't reduce a TREE_CONSTANT vector ctor even if we can't
+ /* Don't reduce an initializer constant 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;
+ if (initializer_constant_valid_p (ctor, type))
+ break;
+
+ TREE_CONSTANT (ctor) = 0;
+ TREE_INVARIANT (ctor) = 0;
}
/* Vector types use CONSTRUCTOR all the way through gimple
+2007-10-29 Richard Sandiford <rsandifo@nildram.co.uk>
+
+ PR tree-optimization/33614
+ * gcc.c-torture/compile/pr33614.c: New test.
+
2007-10-29 Richard Guenther <rguenther@suse.de>
PR tree-optimization/33870