PR tree-optimization/85826 - ICE in gimple-ssa-warn-restruct on
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / vector-6.c
blob785e5dfe424c755e511857b8ddc3bfb46d50fa8c
1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-ccp1 -Wno-psabi -w" } */
3 /* { dg-additional-options "-msse2" { target i?86-*-* x86_64-*-* } } */
4 /* { dg-additional-options "-maltivec" { target powerpc_altivec_ok } } */
6 typedef int v4si __attribute__((vector_size (4 * sizeof (int))));
8 v4si test1 (v4si v, int i)
10 ((int *)&v)[0] = i;
11 return v;
14 v4si test2 (v4si v, int i)
16 int *p = (int *)&v;
17 *p = i;
18 return v;
21 v4si test3 (v4si v, int i)
23 ((int *)&v)[3] = i;
24 return v;
27 v4si test4 (v4si v, int i)
29 int *p = (int *)&v;
30 p += 3;
31 *p = i;
32 return v;
35 /* { dg-final { scan-tree-dump-times "Now a gimple register: v" 4 "ccp1" { target { { i?86-*-* x86_64-*-* aarch64*-*-* spu*-*-* } || { powerpc_altivec_ok } } } } } */