OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [pr40074.c] - Blame information for rev 298

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-require-effective-target vect_int } */
2
 
3
#include <stdarg.h>
4
#include "tree-vect.h"
5
 
6
#define N 16 
7
 
8
typedef struct {
9
   int a;
10
   int b;
11
   int c;
12
   int d;
13
} s;
14
 
15
 
16
s arr[N] = {{7,0,1,5}, {7,2,3,5}, {7,4,5,5}, {7,6,7,5}, {7,8,9,5}, {7,10,11,5}, {7,12,13,5}, {7,14,15,5}, {7,16,17,5}, {7,18,19,5}, {7,20,21,5}, {7,22,23,5}, {7,24,25,5}, {7,26,27,5}, {7,28,29,5}, {7,30,31,5}};
17
 
18
__attribute__ ((noinline)) int
19
main1 ()
20
{
21
  s *p = arr, *q = arr + 1;
22
  int res[N];
23
  int i;
24
 
25
  for (i = 0; i < N-1; i++)
26
    {
27
      res[i] = p->b + p->d + q->b;
28
      p++;
29
      q++;
30
    }
31
 
32
  /* check results:  */
33
  for (i = 0; i < N-1; i++)
34
    {
35
      if (res[i] != arr[i].b + arr[i].d + arr[i+1].b)
36
        abort ();
37
    }
38
 
39
  return 0;
40
}
41
 
42
int main (void)
43
{
44
  int i;
45
 
46
  check_vect ();
47
 
48
  main1 ();
49
 
50
  return 0;
51
}
52
 
53
/* { dg-final { cleanup-tree-dump "vect" } } */
54
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.