OSDN Git Service

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