New test (alias problems).
From-SVN: r19594
This commit is contained in:
parent
6b879bcc3b
commit
6b7a2613b7
1 changed files with 22 additions and 0 deletions
22
gcc/testsuite/gcc.c-torture/execute/980506-2.c
Normal file
22
gcc/testsuite/gcc.c-torture/execute/980506-2.c
Normal file
|
@ -0,0 +1,22 @@
|
|||
static void *self(void *p){ return p; }
|
||||
|
||||
int
|
||||
f()
|
||||
{
|
||||
struct { int i; } s, *sp;
|
||||
int *ip = &s.i;
|
||||
|
||||
s.i = 1;
|
||||
sp = self(&s);
|
||||
|
||||
*ip = 0;
|
||||
return sp->i+1;
|
||||
}
|
||||
|
||||
main()
|
||||
{
|
||||
if (f () != 1)
|
||||
abort ();
|
||||
else
|
||||
exit (0);
|
||||
}
|
Loading…
Add table
Reference in a new issue