Add an x86_64 sample.
1 Message-Id: 20030822160024.GA305@ftbfs.org
2 From: Matt Kraai kraai at alumni dot cmu dot edu
3 To: gcc-patches at gcc dot gnu dot org
4 Date: Fri, 22 Aug 2003 09:00:24 -0700
9 I've backported the following patch from the mainline to the 3.3
10 branch to fix PR 11949.
12 Bootstrapped and regression tested on powerpc-unknown-linux-gnu.
17 Backport from mainline:
19 2003-05-05 Aldy Hernandez aldyh@redhat.com
21 * testsuite/gcc.c-torture/compile/simd-6.c: New.
23 * c-typeck.c (digest_init): Handle arrays of vector constants.
26 ===================================================================
27 RCS file: /cvs/gcc/gcc/gcc/c-typeck.c,v
28 retrieving revision 1.213.2.8
29 diff -3 -c -p -r1.213.2.8 c-typeck.c
30 *** gcc/gcc/c-typeck.c 19 Aug 2003 01:42:35 -0000 1.213.2.8
31 --- gcc/gcc/c-typeck.c 22 Aug 2003 09:24:03 -0000
32 *************** digest_init (type, init, require_constan
34 if (code == VECTOR_TYPE
35 && comptypes (TREE_TYPE (inside_init), type)
36 && TREE_CONSTANT (inside_init))
37 ! return build_vector (type, TREE_OPERAND (inside_init, 1));
40 /* Any type can be initialized
41 from an expression of the same type, optionally with braces. */
43 if (code == VECTOR_TYPE
44 && comptypes (TREE_TYPE (inside_init), type)
45 && TREE_CONSTANT (inside_init))
47 ! if (TREE_CODE (inside_init) == VECTOR_CST
48 ! && comptypes (TYPE_MAIN_VARIANT (TREE_TYPE (inside_init)),
49 ! TYPE_MAIN_VARIANT (type)))
52 ! return build_vector (type, CONSTRUCTOR_ELTS (inside_init));
55 /* Any type can be initialized
56 from an expression of the same type, optionally with braces. */
58 typedef int __attribute__((mode(V2SI))) vec;
60 vec a[] = {(vec) {1, 2}, {3, 4}};