OSDN Git Service

* gcc.target/i386/pr34256.c: Update number of mov insns
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.target / powerpc / altivec-23.c
1 /* Verify that it is possible to define variables of composite types
2    containing vector types.  We used to crash handling the
3    initializer of automatic ones.  */
4
5 /* { dg-do compile } */
6 /* { dg-require-effective-target powerpc_altivec_ok } */
7 /* { dg-options "-maltivec -mabi=altivec" } */
8
9 #include <altivec.h>
10
11 typedef vector int vt;
12 typedef struct { vt x; int y[sizeof(vt) / sizeof (int)]; } st;
13 #define INIT { 1, 2, 3, 4 }
14
15 void f ()
16 {
17   vt x = INIT;
18   vt y[1] = { INIT };
19   st s = { INIT, INIT };
20 }
21
22 vt x = INIT;
23 vt y[1] = { INIT };
24 st s = { INIT, INIT };