[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in gcc 2.5.8



Hello Erling,

> I now know that there definitely are bugs with optimization in gcc 2.5.8.
> This is probably what makes mint compiled with this gcc incompatible with
> the multitos AES. Here is an example of a routine that fails with
> optimization turned on: (From the config program to isofs)
> 
>   for(i=0;i<16;i++) {
>     if(Fread(fd,sizeof(short),&scsidev)!=sizeof(short)) {
>       break;
>     }
>     if(Fread(fd,sizeof(short),&scsilun)!=sizeof(short)) {
>       break;
>     }
> 
> /* NOTE: scsidev and scsilun is not valid if optimization is turned on */
> /*	 They seem to both contain zero. */

I would be tempted to believe it's a problem with the inline assembly
binding of Fread() -- maybe an incorrect register constraint --
causing GCC to believe that the above loop can be optimized (ouch!)
or something equally nasty. Could you post the assembly code generated?

Thierry.