+2003-05-05 Aldy Hernandez <aldyh@redhat.com>
+
+ * testsuite/gcc.c-torture/compile/simd-6.c: New.
+
+ * c-typeck.c (digest_init): Handle arrays of vector constants.
+
2003-05-05 Jakub Jelinek <jakub@redhat.com>
* builtins.c (expand_builtin_mempcpy): New function.
/* Build a VECTOR_CST from a *constant* vector constructor. If the
vector constructor is not constant (e.g. {1,2,3,foo()}) then punt
below and handle as a constructor. */
- if (code == VECTOR_TYPE
- && comptypes (TREE_TYPE (inside_init), type)
- && TREE_CONSTANT (inside_init))
- return build_vector (type, CONSTRUCTOR_ELTS (inside_init));
+ if (code == VECTOR_TYPE
+ && comptypes (TREE_TYPE (inside_init), type)
+ && TREE_CONSTANT (inside_init))
+ {
+ if (TREE_CODE (inside_init) == VECTOR_CST
+ && comptypes (TYPE_MAIN_VARIANT (TREE_TYPE (inside_init)),
+ TYPE_MAIN_VARIANT (type)))
+ return inside_init;
+ else
+ return build_vector (type, CONSTRUCTOR_ELTS (inside_init));
+ }
/* Any type can be initialized
from an expression of the same type, optionally with braces. */