[cc65] 2.8.0 bugging

Date view Thread view Subject view

From: groepaz (groepaz_at_gmx.net)
Date: 2002-06-16 20:53:43


i've just (finally ;=P) moved to 2.8.0 and found it breaking loads of
code that worked just fine with previous versions ;=/

looks to me as if the problem somehow is related to 2-dimensional
arrays.... (that slow-as-fuck fire-effect i prepared suddenly stopped
working aswell ;=P) below is a piece of code from the testsuite i was
preparing, may help to find the problem.... (i compiled with -Oirs and
the resulting binary just hangs/crashes...it didnt do this with
previous version)

i'll try to find some time during the next days and atleast pack the
testing suite together for that matter... looks like it shows some
other problems aswell....

----code start----

int x[3][4], *y[3];

main() {
        int z[3][4];
        int i, j, *p;

        for (i = 0; i < 3; i++) {
                for (j = 0; j < 4; j++)
                        x[i][j] = 1000*i + j;
                y[i] = x[i];
        }
        f();
        for (i = 0; i < 3; i++) {
                y[i] = p = &z[i][0];
                for (j = 0; j < 4; j++)
                        p[j] = x[i][j];
        }
        g(z, y);
        return 0;
}

f() {
        int i, j;

        for (i = 0; i < 3; i++)
                for (j = 0; j < 4; j++)
                        printf(" %d", x[i][j]);
        printf("\n");
        for (i = 0; i < 3; i++)
                for (j = 0; j < 4; j++)
                        printf(" %d", y[i][j]);
        printf("\n");
}

g(x, y)
int x[][4], *y[];
{
        int i, j;

        for (i = 0; i < 3; i++)
                for (j = 0; j < 4; j++)
                        printf(" %d", x[i][j]);
        printf("\n");
        for (i = 0; i < 3; i++)
                for (j = 0; j < 4; j++)
                        printf(" %d", y[i][j]);
        printf("\n");
}

----code end----

-- 
Best regards,
 groepaz                            mailto:groepaz_at_gmx.net


----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2002-06-16 20:55:43 CEST