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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [compat/] [struct-ic.c] - Blame information for rev 711

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

Line No. Rev Author Line
1 688 jeremybenn
typedef struct {int a; char b;} T;
2
 
3
int h (T *);
4
T g (T);
5
 
6
#if COMPILER != 1
7
h (T *x)
8
{
9
  if (x->a != 0 || x->b != 1)
10
    abort ();
11
}
12
#endif
13
 
14
#if COMPILER != 2
15
T
16
g (T x)
17
{
18
  if (x.a != 13 || x.b != 47)
19
    abort ();
20
  x.a = 0;
21
  x.b = 1;
22
  h (&x);
23
  return x;
24
}
25
#endif
26
 
27
#if COMPILER != 1
28
f ()
29
{
30
  T x;
31
  x.a = 13;
32
  x.b = 47;
33
  g (x);
34
  if (x.a != 13 || x.b != 47)
35
    abort ();
36
  x = g (x);
37
  if (x.a != 0 || x.b != 1)
38
    abort ();
39
}
40
#endif
41
 
42
#if COMPILER != 2
43
main ()
44
{
45
  f ();
46
  exit (0);
47
}
48
#endif

powered by: WebSVN 2.1.0

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