mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-06 02:10:29 +08:00
Add new test
From-SVN: r24886
This commit is contained in:
parent
d5a06ad917
commit
a1660badb6
@ -1,3 +1,7 @@
|
||||
1999-01-27 Michael Meissner <meissner@cygnus.com>
|
||||
|
||||
* execute/990127-1.c: New test.
|
||||
|
||||
1998-12-14 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* execute/920501-4.c (main): Fix typo: replace | with ||.
|
||||
|
31
gcc/testsuite/gcc.c-torture/execute/990127-1.c
Normal file
31
gcc/testsuite/gcc.c-torture/execute/990127-1.c
Normal file
@ -0,0 +1,31 @@
|
||||
main()
|
||||
{
|
||||
int a,b,c;
|
||||
int *pa, *pb, *pc;
|
||||
int **ppa, **ppb, **ppc;
|
||||
int i,j,k,x,y,z;
|
||||
|
||||
a = 10;
|
||||
b = 20;
|
||||
c = 30;
|
||||
pa = &a; pb = &b; pc = &c;
|
||||
ppa = &pa; ppb = &pb; ppc = &pc;
|
||||
x = 0; y = 0; z = 0;
|
||||
|
||||
for(i=0;i<10;i++){
|
||||
if( pa == &a ) pa = &b;
|
||||
else pa = &a;
|
||||
while( (*pa)-- ){
|
||||
x++;
|
||||
if( (*pa) < 3 ) break;
|
||||
else pa = &b;
|
||||
}
|
||||
x++;
|
||||
pa = &b;
|
||||
}
|
||||
|
||||
if ((*pa) != -5 || (*pb) != -5 || x != 43)
|
||||
abort ();
|
||||
|
||||
exit (0);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user