From ripley at stats.ox.ac.uk  Tue May  4 12:13:00 2004
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Tue May  4 12:13:04 2004
Subject: [Rd] gcc 3.4.0 on Linux i686 fails to run R for me
In-Reply-To: <Pine.LNX.4.44.0405040919010.17245-100000@gannet.stats>
Message-ID: <Pine.LNX.4.44.0405041104400.8772-100000@gannet.stats>

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

> 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.

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?

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


[Rd] gcc 3.4.0 on Linux i686 fails to run R for me
Prof Brian Ripley