On Tue, Jan 05, 2021 at 11:26:24AM -0700, Jeff Law wrote: > > > On 1/4/21 3:28 PM, Steve Kargl wrote: > > On Mon, Jan 04, 2021 at 02:30:43PM -0700, Jeff Law wrote: > >> On 1/2/21 1:34 AM, Steve Kargl via Gcc-patches wrote: > >>> Can someone, anyone, please commit the following trivially patch? > >>> gfortran.dg/dec_math.f90 will never pass on i?86-*-freebsd*. > >> Why will the test never pass on that platform? I don't mind installing > >> the patch, but I'd like to have a bit more background first :-) > >> > > The testcase assumes REAL(10) has 64-bits of precision. On > > i?86-*-freebsd, the i387 FPU control word is set to 53-bits. > > The test program is not set up to deal with 11-bits of > > missing precision. > Thanks. That's precisely what I needed to know. I suspected it was > related to the differing state of the fpu control word. But that begs > the question of whether or not the change should apply to the other BSD > variants. >
I don't know about other BSD variants. The setting of the control word was done some 27 years ago on i?86-FreeBSD. Hmmm. A little code spelunking back to original FreeBSD 2.0.5, https://svnweb.freebsd.org/base/stable/2.0.5/sys/i386/include/npx.h?revision=4&view=markup The lines 101-132 provide the justification for the control word. AFIK, older FreeBSD sources are not published on FreeBSD.org due to USL lawsuit. If this file is current http://mirror.nyi.net/NetBSD/misc/joerg/GENERIC/src/src/sys/arch/x86/include/cpu_extended_state.h.html then NetBSD is not affected unless, you are using a older version. See lines 196-220. -- Steve