Date: Sun, 10 Jan 1999 11:50:03 -0800 (PST) From: Steve Kargl <sgk@troutmask.apl.washington.edu> To: dfr@FreeBSD.ORG (Doug Rabson) Cc: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/usr.bin/f2c proc.c Message-ID: <199901101950.LAA03808@troutmask.apl.washington.edu> In-Reply-To: <199901101722.JAA24036@freefall.freebsd.org> from Doug Rabson at "Jan 10, 1999 9:22:51 am"
next in thread | previous in thread | raw e-mail | index | archive | help
According to Doug Rabson: > dfr 1999/01/10 09:22:51 PST > > Modified files: > usr.bin/f2c proc.c > Log: > From the submitter: > > I found the reason why f77 so offen dies on alpha. Here is a fix. > "Const" is a union of int and double. > If nelt->constblock.Const.ci > 0 then it trys to evaluate it as double > and floating point exception occurs. > There may be worse problems with f2c on alpha machines. My Alphastation runs Digital Unix, so I haven't had a channce to FreeBSD/axp. >From http://www.netlib.org/f2c/readme: NOTE: f2c.h defines several types, e.g., real, integer, doublereal. The definitions in f2c.h are suitable for most machines, but if your machine has sizeof(double) > 2*sizeof(long), you may need to adjust f2c.h appropriately. f2c assumes sizeof(doublecomplex) = 2*sizeof(doublereal) sizeof(doublereal) = sizeof(complex) sizeof(doublereal) = 2*sizeof(real) sizeof(real) = sizeof(integer) sizeof(real) = sizeof(logical) sizeof(real) = 2*sizeof(shortint) EQUIVALENCEs may not be translated correctly if these assumptions are violated. On machines, such as those using a DEC Alpha processor, on which sizeof(short) == 2, sizeof(int) == sizeof(float) == 4, and sizeof(long) == sizeof(double) == 8, it suffices to modify f2c.h by removing the first occurrence of "long " on each line containing "long ", e.g., by issuing the commands mv f2c.h f2c.h0 sed 's/long //' f2c.h0 >f2c.h On such machines, one can enable INTEGER*8 by uncommenting the typedef of longint in f2c.h, so it reads typedef long longint; by compiling libI77 with -DAllow_TYQUAD, and by adjusting libF77/makefile as described in libF77/README. Some machines may have sizeof(int) == 4, sizeof(float) == 8, and sizeof(long long) == 8. On such machines, adjust f2c.h by changing "long int " to "long long ", e.g., by saying mv f2c.h f2c.h0 sed 's/long int /long long /' f2c.h0 >f2c.h One can enable INTEGER*8 on such machines as described above, but with typedef long long longint; -- Steve finger kargl@troutmask.apl.washington.edu http://troutmask.apl.washington.edu/~clesceri/kargl.html To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901101950.LAA03808>