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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20020810-1.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* PR target/7559
2
   This testcase was miscompiled on x86-64, because classify_argument
3
   wrongly computed the offset of nested structure fields.  */
4
 
5
extern void abort (void);
6
 
7
struct A
8
{
9
  long x;
10
};
11
 
12
struct R
13
{
14
  struct A a, b;
15
};
16
 
17
struct R R = { 100, 200 };
18
 
19
void f (struct R r)
20
{
21
  if (r.a.x != R.a.x || r.b.x != R.b.x)
22
    abort ();
23
}
24
 
25
struct R g (void)
26
{
27
  return R;
28
}
29
 
30
int main (void)
31
{
32
  struct R r;
33
  f(R);
34
  r = g();
35
  if (r.a.x != R.a.x || r.b.x != R.b.x)
36
    abort ();
37
  return 0;
38
}

powered by: WebSVN 2.1.0

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