From ripley at stats.ox.ac.uk  Tue Nov 25 22:22:08 2003
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Tue Nov 25 22:21:06 2003
Subject: [Rd] O2 optimization produces wrong code (PR#5315)
In-Reply-To: <x2oev0rww4.fsf@biostat.ku.dk>
Message-ID: <Pine.LNX.4.44.0311252120320.9796-100000@gannet.stats>

On 25 Nov 2003, Peter Dalgaard wrote:

> Duncan Murdoch <dmurdoch@pair.com> writes:
> 
> > On Tue, 25 Nov 2003 15:47:01 +0000 (GMT), Prof Brian Ripley
> > <ripley@stats.ox.ac.uk> wrote :
> > 
> > >This is a long-known problem: one example is the MASS example in the
> > >script ch15.R, and that has gone wrong on platforms other than Windows.  
> > >It has been reported to the maintainer in the past.
> > 
> > Should we back off to something less aggressive than -O2?
> 
> Traditionally, we've prioritized performance and used cases like this
> to file bugs for the compiler writers. But is this really a compiler
> problem or a problem with badly written code in akima??

I suspect the latter, in particular I suspect uninitialized data areas.
As far as I recall, this has gone wrong even without optimization.

-- 
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] O2 optimization produces wrong code (PR#5315)
Prof Brian Ripley