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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [pr29091.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* PR c/29091 */
2
/* { dg-do run } */
3
/* { dg-options "-O2" } */
4
 
5
extern void abort (void);
6
 
7
__attribute__ ((vector_size (sizeof (int) * 4))) int a = { 1, 2 };
8
int d = 3;
9
__attribute__ ((vector_size (sizeof (int) * 4))) int b = { 4, 5, 6 };
10
int e = 7;
11
__attribute__ ((vector_size (sizeof (int) * 4))) int c = { };
12
 
13
int
14
main (void)
15
{
16
  int *p = (int *) &a;
17
  if (p[0] != 1)
18
    abort ();
19
  if (p[1] != 2)
20
    abort ();
21
  if (p[2] != 0)
22
    abort ();
23
  if (p[3] != 0)
24
    abort ();
25
  p = (int *) &b;
26
  if (p[0] != 4)
27
    abort ();
28
  if (p[1] != 5)
29
    abort ();
30
  if (p[2] != 6)
31
    abort ();
32
  if (p[3] != 0)
33
    abort ();
34
  p = (int *) &c;
35
  if (p[0] != 0)
36
    abort ();
37
  if (p[1] != 0)
38
    abort ();
39
  if (p[2] != 0)
40
    abort ();
41
  if (p[3] != 0)
42
    abort ();
43
  return 0;
44
}

powered by: WebSVN 2.1.0

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