CSE bug (gcc.c-torture/execute/980605-1.c)
H.J. Lu
hjl@lucon.org
Tue Jul 7 10:14:00 GMT 1998
>
> I have investigating the same bug for a few days, and I think I have evidence
> that this patch can't be correct.
>
> This is a preliminary post, I am not done with my research at all.
> But I thought it would be better to tell you that I am working on this too -
> and that I'd like to do a little more research before Davids patch is added :).
> It may be important that I am trying a slightly different test case:
>
> ========================================
> 980505-1.i:
> ========================================
> # 1 "/usr/src/egcs/egcs-cvs/gcc/testsuite/gcc.c-torture/execute/980505-1.c"
> int f(int) __attribute__((const));
> int main()
> {
> int f1, f2, x;
> x = 1;
> f1 = f(x);
> x = 2;
> f2 = f(x);
> if (f1 == 1)
> if (f2 == 2)
> exit(0);
> abort();
> }
FWIW, my patch, which is wrong, works on both testcases.
H.J.
More information about the Gcc
mailing list