Imported Upstream version 4.7.3
[platform/upstream/gcc48.git] / gcc / testsuite / gcc.dg / vect / vect-complex-5.c
1 /* { dg-require-effective-target vect_int } */
2
3 #include <stdarg.h>
4 #include "tree-vect.h"
5
6 #define N 16
7
8 struct foostr {
9   _Complex short f1;
10   _Complex short f2;
11 };
12
13 _Complex short a1[64] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
14 _Complex short a2[64] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
15 _Complex short b1[64] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
16 _Complex short b2[64] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
17 struct foostr c[64] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
18
19 __attribute__ ((noinline)) void
20 foo (void)
21 {
22   int i;
23
24   for (i = 0; i < N; i++)
25     {
26       c[i].f1 = a1[i] + b1[i];
27       c[i].f2 = a2[i] + b2[i];
28     }
29
30 }
31
32 int
33 main (void)
34
35   int i;
36   check_vect ();
37   
38   foo ();
39
40   return 0;
41 }
42
43 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" } } */
44 /* { dg-final { cleanup-tree-dump "vect" } } */