Skip to content

gcc 3.4.0 on Linux i686 fails to run R for me

2 messages · Brian Ripley

#
I've just installed gcc-3.4.0 on RH8.0 (on a dual athlon MP, if it
matters) and rebuilt R.  I find interSpline (in example(autoload)) is
failing to complete.  It seems to be looping in dlamc1 in dlapack0.f.
This happened both with ATLAS and the BLAS built in to R.

I will dig a little deeper, but it might be helpful to have a warning on 
record.
#
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?