Didn't work for me either. Looking at the generated assembler it is clear
one of the memory accesses of pm gets optimized away in the loop. The
volatile keyword on pm works, and I believe is the best solution as well.

Michael

On 08/08/09 1:22 PM, "Philippe Michel" <[email protected]> wrote:

> The changes to eval.c you committed don't help for me. I still get the
> wrong results.
> 
> On the other hand, adding the g_print() in eval.c 1.376 does indeed work
> around the problem. So does the following change :
> 
> --- eval.c.orig    2009-07-10 21:32:52.000000000 +0200
> +++ eval.c      2009-08-08 20:59:46.000000000 +0200
> @@ -5765,7 +5765,7 @@
>         float arInput[200];
> 
>         for(i = 0; i < ml.cMoves; i++) {
> -       move* const pm = &ml.amMoves[i];
> +       move* const volatile pm = &ml.amMoves[i];
> 
>          PositionFromKey(anBoardOut, pm->auch);
>          SwapSides(anBoardOut);
> 
> 




_______________________________________________
Bug-gnubg mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gnubg

Reply via email to