Dear ciao-users, we have realised that some versions of gcc (in particular, gcc2.96, which is shipped with at least Red Hat 7.1), seem to produce incorrect code for Ciao Prolog. This can be tested simply by issuing the query
?- X = 1.0.
at the toplevel. If the answer comes wrong, then you have been hit.
I found the problem on my Redhat 7.1 Linux on an Athlon system, with ciao1.6p1. Together with gcc 2.96, kgcc (which is gcc 2.91.66) is shipped with that distribution to be used for kernel compilation, since gcc 2.96 causes many known problems if used for that purpose. I compiled ciao with kgcc, leaving the optimization level at "optimized", and everything seems to work fine (or at least it passes the "X=1.0." test :) ). To compile with kgcc instead of gcc, simply edit the makefile-sysdep/mkf-LINUXi86 file, substituting "kgcc" to "gcc" in the lines beginning with "CC=" and "LD="
Regards,
Marco