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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [builtins/] [20010124-1.c] - Blame information for rev 774

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

Line No. Rev Author Line
1 688 jeremybenn
/* Verify that structure return doesn't invoke memcpy on
2
   overlapping objects.  */
3
 
4
extern void abort (void);
5
 
6
struct S {
7
  char stuff[1024];
8
};
9
 
10
union U {
11
  struct {
12
    int space;
13
    struct S s;
14
  } a;
15
  struct {
16
    struct S s;
17
    int space;
18
  } b;
19
};
20
 
21
struct S f(struct S *);
22
void g(union U *);
23
 
24
void main_test(void)
25
{
26
  union U u;
27
  u.b.s = f(&u.a.s);
28
  u.a.s = f(&u.b.s);
29
  g(&u);
30
}

powered by: WebSVN 2.1.0

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