Problems with gcc-3.1 -O2 on Solaris

cberry@tajo.ucsd.edu cberry@tajo.ucsd.edu
Mon, 5 Aug 2002 09:42:49 -0700 (PDT)


On Sat, 3 Aug 2002 ripley@stats.ox.ac.uk wrote:

> I've been having problems with gcc-3.1 and R-devel on one of our Solaris 7
> systems (not the one I usually use).  We have seen a report of
> this before (Chuck Berry, 17 July 2002).
> 
> The symptom is that make check fails with var(1) being NaN not NA.  The
> underlying cause is that as.double(NA) is NaN.
> 
> It can be solved by compiling arithmetic.c without -O2.
> 
> Another installation with a single-processor UltraSparc 1 works correctly.
> My guess is that gcc-3.1 and multiprocessor/Sparc IIIs are not mixing.

FWIW, the specific problem seems to be with 

static const int hw = 0;
static const int  lw = 1;

and their use in array style indexing like this:

	y.word[lw] == 1954
	y.word[lw] != 1954

R passes 'make check' on my Solaris 8 Blade 100 with -O2 when *either*
'const' is dropped or ' *(y.word + lw) == 1954 ' style indexing is used.

Chuck

Charles C. Berry                        (858) 534-2098 
                                         Dept of Family/Preventive Medicine
E mailto:cberry@tajo.ucsd.edu	         UC San Diego
http://hacuna.ucsd.edu/members/ccb.html  La Jolla, San Diego 92093-0645

 

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._