URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 297 |
Rev 338 |
struct Foo {
|
struct Foo {
|
int *p;
|
int *p;
|
int *q;
|
int *q;
|
};
|
};
|
|
|
void __attribute__((noinline))
|
void __attribute__((noinline))
|
bar (int **x)
|
bar (int **x)
|
{
|
{
|
struct Foo *f = (struct Foo *)x;
|
struct Foo *f = (struct Foo *)x;
|
*(f->q) = 0;
|
*(f->q) = 0;
|
}
|
}
|
|
|
int foo(void)
|
int foo(void)
|
{
|
{
|
struct Foo f;
|
struct Foo f;
|
int i = 1, j = 2;
|
int i = 1, j = 2;
|
f.p = &i;
|
f.p = &i;
|
f.q = &j;
|
f.q = &j;
|
bar(&f.p);
|
bar(&f.p);
|
return j;
|
return j;
|
}
|
}
|
|
|
extern void abort (void);
|
extern void abort (void);
|
int main()
|
int main()
|
{
|
{
|
if (foo () != 0)
|
if (foo () != 0)
|
abort ();
|
abort ();
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.