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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [vector-subscript-3.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 688 jeremybenn
/* dg-do run */
2
#define vector __attribute__((vector_size(16) ))
3
 
4
/* Check whether register declaration of vector type still
5
   allow us to subscript this type.  */
6
 
7
typedef vector short myvec_t;
8
 
9
struct vec_s {
10
    vector short member;
11
};
12
 
13
 
14
int main () {
15
  register short vector v0 = {1,2,3,4,5,6,7};
16
  register myvec_t v1 = {1,2,3,4,5,6,7};
17
  register struct vec_s v2;
18
 
19
  v2.member = v1;
20
 
21
  short r = v0[0] + v1[1] + v2.member[2];
22
  if (r != 6)
23
    __builtin_abort ();
24
 
25
  return 0;
26
}

powered by: WebSVN 2.1.0

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