Skip to content
Prev 12577 / 63461 Next

gcc 3.4.0 on Linux i686 fails to run R for me

On Tue, 4 May 2004, Prof Brian Ripley wrote:

            
The issue is

*  DLAMC3  is intended to force  A  and  B  to be stored prior to doing
*  the addition of  A  and  B ,  for use in situations where optimizers
*  might hold one of these in a register.
*     .. Executable Statements ..
*
      DLAMC3 = A + B

and it seems that -O2 on gcc 3.4.0 manages to defeat this.

Compiling without -O2 or with -ffloat-store works correctly.

My guess is that there is no way to control this from the Fortran code, 
and we are going to have to arrange to compile this piece of code under 
non-standard optimization options.  Anyone know better?