* gcc.c-torture/execute/20000717-3.c: New test.
From-SVN: r35090
This commit is contained in:
parent
bd83f9a5d7
commit
bf4ddb3165
@ -1,5 +1,7 @@
|
||||
Mon Jul 17 03:13:12 2000 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* gcc.c-torture/execute/20000717-3.c: New test.
|
||||
|
||||
* gcc.c-torture/compile/20000717-1.c: New test.
|
||||
|
||||
2000-07-17 Geoffrey Keating <geoffk@cygnus.com>
|
||||
|
26
gcc/testsuite/gcc.c-torture/execute/20000717-3.c
Normal file
26
gcc/testsuite/gcc.c-torture/execute/20000717-3.c
Normal file
@ -0,0 +1,26 @@
|
||||
int c = -1;
|
||||
|
||||
foo (p)
|
||||
int *p;
|
||||
{
|
||||
int x;
|
||||
int a;
|
||||
|
||||
a = p[0];
|
||||
x = a + 5;
|
||||
a = c;
|
||||
p[0] = x - 15;
|
||||
return a;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int b = 1;
|
||||
int a = foo(&b);
|
||||
|
||||
if (a != -1 || b != (1 + 5 - 15))
|
||||
abort ();
|
||||
|
||||
exit (0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user