URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 297 |
Rev 338 |
/* Verify that structure return doesn't invoke memcpy on
|
/* Verify that structure return doesn't invoke memcpy on
|
overlapping objects. */
|
overlapping objects. */
|
|
|
extern void abort (void);
|
extern void abort (void);
|
|
|
struct S {
|
struct S {
|
char stuff[1024];
|
char stuff[1024];
|
};
|
};
|
|
|
union U {
|
union U {
|
struct {
|
struct {
|
int space;
|
int space;
|
struct S s;
|
struct S s;
|
} a;
|
} a;
|
struct {
|
struct {
|
struct S s;
|
struct S s;
|
int space;
|
int space;
|
} b;
|
} b;
|
};
|
};
|
|
|
struct S f(struct S *);
|
struct S f(struct S *);
|
void g(union U *);
|
void g(union U *);
|
|
|
void main_test(void)
|
void main_test(void)
|
{
|
{
|
union U u;
|
union U u;
|
u.b.s = f(&u.a.s);
|
u.b.s = f(&u.a.s);
|
u.a.s = f(&u.b.s);
|
u.a.s = f(&u.b.s);
|
g(&u);
|
g(&u);
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.