OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [990127-1.c] - Blame information for rev 856

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
main()
2
{
3
    int a,b,c;
4
    int *pa, *pb, *pc;
5
    int **ppa, **ppb, **ppc;
6
    int i,j,k,x,y,z;
7
 
8
    a = 10;
9
    b = 20;
10
    c = 30;
11
    pa = &a; pb = &b; pc = &c;
12
    ppa = &pa; ppb = &pb; ppc = &pc;
13
    x = 0; y = 0; z = 0;
14
 
15
    for(i=0;i<10;i++){
16
        if( pa == &a ) pa = &b;
17
        else pa = &a;
18
        while( (*pa)-- ){
19
            x++;
20
            if( (*pa) < 3 ) break;
21
            else pa = &b;
22
        }
23
        x++;
24
        pa = &b;
25
    }
26
 
27
    if ((*pa) != -5 || (*pb) != -5 || x != 43)
28
      abort ();
29
 
30
    exit (0);
31
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.