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

Subversion Repositories eco32

[/] [eco32/] [tags/] [eco32-0.25/] [lcc/] [tst/] [front.c] - Diff between revs 4 and 248

Only display areas with differences | Details | Blame | View Log

Rev 4 Rev 248
main() {
main() {
        exit(0);
        exit(0);
}
}
 
 
nested(a,b) {
nested(a,b) {
        if ((a<4 && b == 'r')
        if ((a<4 && b == 'r')
                || (a == 1 && (b == 'h' || b == 'i'))
                || (a == 1 && (b == 'h' || b == 'i'))
                || (a == 2 && (b == 'o' || b == 'y'))
                || (a == 2 && (b == 'o' || b == 'y'))
        ) a=b;
        ) a=b;
}
}
 
 
/* type name scope */
/* type name scope */
 
 
void s(struct D *d) {}  /* this struct D differs from the one below */
void s(struct D *d) {}  /* this struct D differs from the one below */
typedef struct D D;
typedef struct D D;
struct D {int x, y;} Dy={0};
struct D {int x, y;} Dy={0};
D Dz={1};
D Dz={1};
Dfunc(){
Dfunc(){
        D a; a.y=1;
        D a; a.y=1;
        s(&Dy);         /* error */
        s(&Dy);         /* error */
}
}
 
 
/* qualifiers */
/* qualifiers */
 
 
const a; int b;
const a; int b;
const int a, *x; int b, *y;
const int a, *x; int b, *y;
volatile unsigned z;
volatile unsigned z;
 
 
f() {
f() {
        x = y;
        x = y;
        z = z + z;      /* should be 2 references to z's r-value */
        z = z + z;      /* should be 2 references to z's r-value */
}
}
f1() {
f1() {
        x = &a;
        x = &a;
        x = &b;
        x = &b;
        y = &a;         /* error */
        y = &a;         /* error */
        y = &b;
        y = &b;
}
}
f2(int **a, int **b) {
f2(int **a, int **b) {
        f(&x, &y);
        f(&x, &y);
        **a = 0;
        **a = 0;
        return **b;
        return **b;
}
}
g(const int *p) {
g(const int *p) {
        g(&a);
        g(&a);
        g(&b);
        g(&b);
        return *p;
        return *p;
}
}
h(int *p) {
h(int *p) {
        f(&a);
        f(&a);
        f(&b);
        f(&b);
        return *p;
        return *p;
}
}
h1(const int x, int y) {
h1(const int x, int y) {
        h1(a,b);
        h1(a,b);
        h1(b,a);
        h1(b,a);
        return x + y;
        return x + y;
}
}
h2() {
h2() {
        char *b; const void *p;
        char *b; const void *p;
        p = b;
        p = b;
        b = p;          /* error */
        b = p;          /* error */
}
}
 
 
 
 
/* static naming */
/* static naming */
 
 
extern int yy; set1() { { static yy=1; yy=2;} yy=4;}
extern int yy; set1() { { static yy=1; yy=2;} yy=4;}
static int yy; set2() { yy=5; {static yy=2; yy=3; }}
static int yy; set2() { yy=5; {static yy=2; yy=3; }}
static void goo() {}
static void goo() {}
sss() { int goo; { static int goo();} goo=1;}
sss() { int goo; { static int goo();} goo=1;}
rrr(p) float *p; { extern int xr;
rrr(p) float *p; { extern int xr;
 { static float xr;
 { static float xr;
 { extern int *xr; } p=&xr; }}
 { extern int *xr; } p=&xr; }}
 
 
/* local extern */
/* local extern */
 
 
static int ss1;
static int ss1;
int ss3;
int ss3;
extern int ss5;
extern int ss5;
setstatic() { extern int ss1,ss2,ss3,ss4; ss1 = ss2; ss3 = ss4; ss5 = 0;}
setstatic() { extern int ss1,ss2,ss3,ss4; ss1 = ss2; ss3 = ss4; ss5 = 0;}
static int ss2;
static int ss2;
int ss4;
int ss4;
static int ss5;
static int ss5;
 
 
/* function prototypes */
/* function prototypes */
 
 
int fx1(void);
int fx1(void);
int fx1();
int fx1();
 
 
int gx1(double x);
int gx1(double x);
int gx1(x) double x; { gx1(&x); }       /* error */
int gx1(x) double x; { gx1(&x); }       /* error */
 
 
int hx1();
int hx1();
int hx1(double x,...);  /* error */
int hx1(double x,...);  /* error */
 
 
int ff1(double x, int *y);
int ff1(double x, int *y);
int ff1(x,y) float x; int y[]; {x=y[0];}
int ff1(x,y) float x; int y[]; {x=y[0];}
 
 
int gg1(int a);
int gg1(int a);
int gg1(a,b){a=b;}
int gg1(a,b){a=b;}
 
 
int hh1(const int x);
int hh1(const int x);
hh1(a) {return a;}
hh1(a) {return a;}
 
 
extern int strcmp(const char*, const char*);
extern int strcmp(const char*, const char*);
extern void qsort(void*, int, int, int (*)(const void*, const void*));
extern void qsort(void*, int, int, int (*)(const void*, const void*));
extern int cmp(char**a, char**b) { return strcmp(*a,*b); }
extern int cmp(char**a, char**b) { return strcmp(*a,*b); }
sort() {
sort() {
        int n; char *a[100];
        int n; char *a[100];
        qsort(a, n, sizeof(char*), (int (*)(const void*, const void*))cmp);
        qsort(a, n, sizeof(char*), (int (*)(const void*, const void*))cmp);
        qsort(a, n, sizeof(char*), cmp);        /* error */
        qsort(a, n, sizeof(char*), cmp);        /* error */
}
}
 
 
/* nasty calls */
/* nasty calls */
 
 
onearg(){
onearg(){
        int a,b,c,d;
        int a,b,c,d;
        f( ( (a? (b = 1): (c = 2)), (d ? 3 : 4) ) );    /* 1 argument */
        f( ( (a? (b = 1): (c = 2)), (d ? 3 : 4) ) );    /* 1 argument */
}
}
 
 

powered by: WebSVN 2.1.0

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