The current development version dies in qbeta() when compiled with egcs -O, egcs 1.0.2 and glibc 2.0.7 (RedHat versions). Since this also kill the F and t distributions, it doesn't exactly do wonders for R's usefulness... Anyone else seeing this or has my setup just gone out of whack? It does look pretty much like a clear compiler bug when inlining math functions (storing temporaries offset from %ebx, but no setting of %ebx register to anything useful...) The following paraphrase on R's qbeta.c appears to be a close to minimal example of the problem (no, it doesn't do anything useful, and there are several obvious things wrong with it, but it displays the %ebx problem, if you look at the generated code): #include <math.h> double lbeta(){} double qbeta(double alpha, double p, double q) { double t,r, logbeta; volatile double xinbta; logbeta = lbeta(p, q); if (p<1) t = r * pow(t, 3.); return xinbta; } main(){qbeta(.5,.5,.5);} [pd@butterfly sandbox]$ egcs -O qbeta.c -lm [pd@butterfly sandbox]$ ./a.out Segmentation fault (core dumped) [pd@butterfly sandbox]$ egcs qbeta.c -lm [pd@butterfly sandbox]$ ./a.out -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Peter Dalgaard BSA <p.dalgaard@biostat.ku.dk> writes:> The current development version dies in qbeta() when compiled with > egcs -O, egcs 1.0.2 and glibc 2.0.7 (RedHat versions). Since this also > kill the F and t distributions, it doesn't exactly do wonders for R's > usefulness... > > Anyone else seeing this or has my setup just gone out of whack? It > does look pretty much like a clear compiler bug when inlining math > functions (storing temporaries offset from %ebx, but no setting of > %ebx register to anything useful...)At what optimization? I've had various problems with older versions of EGCS (and have gone back to gcc 2.7.2 except when I must have reasonable c++ features) best, -tony -- A.J. Rossini Rsrch Asst. Professor Senior Biostatistician Biostatistics, University of Washington Epimetrics Corporation Center for AIDS Research rossini@biostat.washington.edu rossini@epimetrics.com http://www.biostat.washington.edu/~rossini/ http://www.epimetrics.com/ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> To: Peter Dalgaard BSA <p.dalgaard@biostat.ku.dk> > Cc: r-devel@stat.math.ethz.ch > Subject: Re: EGCS optimizer bug? > From: Douglas Bates <bates@stat.wisc.edu> > Date: 27 Oct 1998 08:59:33 -0600 > > >>>>> "PD" == Peter Dalgaard BSA <p.dalgaard@biostat.ku.dk> writes: > > PD> Peter Dalgaard BSA <p.dalgaard@biostat.ku.dk> writes: > >> Anyone tried egcs1.1b? > > PD> Apparently not... But now I have, and it appears to be OK at > PD> -O2. > > PD> Pity that it's 11 MB source and that the defunct 1.0.2 is whatIt is not though. The full system is 8.5Mb in the preferred bzip2 format, and C+g77 is 7.0Mb in source. I downloaded the lot in about 30mins to my home machine.> PD> ships on RedHat CD's. [There are binaries on contrib.redhat.com, > PD> though. You could probably make do with 2.8MB (C + g77) of > PD> those] > > Is 1.0.2 shipped on RedHat 5.2 CD's or are you referring to RH 5.1? > > The numbering of egcs under Debian is different. The version that > will be in Debian 2.1, that release that is currently frozen and being > tested, is numbered 2.91.57 to avoid conflicts with release numbering > in gcc. It appears that 2.91.57 was derived from a 1.1-prerelease > version of egcs.ecgs release 1.1b reports: toucan.stats# ./gcc -v Using builtin specs. gcc version egcs-2.91.57 19980901 (egcs-1.1 release) so my guess is that this is the same release. -- 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 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._