How could I test this specific change on powerpc macOS (assuming the build itself succeeds: it did for 16.2.0 at least)?
On Sun, Nov 22, 2026 at 4:56 AM Igor Shevlyakov <[email protected]> wrote: > Hi Steve, > > Sorry for the slow reply. The patch is attached. It applies cleanly to > current trunk with both "patch -p1" and "git am"; none of the files it > touches has changed since I posted it. The raw mail from the archive > applies too, as Mikael said: > > > https://inbox.sourceware.org/gcc-patches/gcc-upstream.upstream-bugfix-1004-pr82968.v1.20261019t2231...@tachyum.com/raw > > In short: get_fpu_state and set_fpu_state receive a character buffer > with no more than byte alignment (the front end's fpstate temporary, or > the hidden component of IEEE_STATUS_TYPE), but every fpu-*.h used it > directly as fenv_t or its own state struct. That is the SIGBUS in > __fegetenv for ieee_6.f90 at -O0 on SPARC. The patch builds the state > in an aligned local and memcpys it to and from the buffer, so the buffer > layout, and that of user types containing IEEE_STATUS_TYPE, stays the > same. > > I bootstrapped and regtested it on x86_64-pc-linux-gnu (-m32/-m64). > x86 uses fpu-387.h, so that is the only implementation the regtest > exercised; the other five were only read. I have no SPARC machine to > confirm the SIGBUS is gone there. The new test, > gfortran.dg/ieee/pr82968.f90, puts two IEEE_STATUS_TYPE components at > offsets 1 and 34, so it should fault on SPARC without the patch. > > OK for trunk? > > Thanks, > Igor >
