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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [compat/] [struct-i.c] - Blame information for rev 859

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

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

powered by: WebSVN 2.1.0

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