Hi Eric,
> this isn't really valid Ada semantics, but some people enable traps-on-fp-
> exceptions in the FPU on Solaris and expect the Ada exception to be caught.
> There is a glitch with the x87 and the SPARC FPUs: the SIGFPE is delivered
> after the faulting instruction by Solaris, so the unwinder is fooled and
> miscomputes the faulting address.
>
> Fixed thusly, tested on x86/Solaris and SPARC/Solaris, OK for mainline?
I've included the patch in my Solaris bootstraps this weekend, and
results don't look good:
* On Solaris 9/x86 and Solaris 10/x86 (both 32- and 64-bit), I get a new
ACATS failure which may or may not be related:
+FAIL: cxg2021
i386 only, might be related
,.,. CXG2021 ACATS 2.5 13-05-27 17:47:57
---- CXG2021 Check the accuracy of the complex SIN and COS functions.
* CXG2021 Identity_2_Test 3 0: Cos(( 1.60300E+01, 1.60000E+01))
imaginary part actual: 1.40623E+06 expected:
1.40622E+06 difference: 4.00000E+00 max err:
3.68797E+00 efactor: 1.40623E+06.
**** CXG2021 FAILED ****************************.
* The new gnat.dg/fp_exception.adb test fails on Solaris 9 and 10/x86,
Solaris 9 and 11/SPARC:
+FAIL: gnat.dg/fp_exception.adb execution test
raised CONSTRAINT_ERROR : SIGFPE
I haven't yet checked what might be going on.
Rainer
> 2013-05-23 Eric Botcazou <[email protected]>
>
> libgcc/
> * config/sparc/sol2-unwind.h (MD_FALLBACK_FRAME_STATE_FOR): Do not set
> fs->signal_frame for SIGFPE raised for IEEE-754 exceptions.
> * config/i386/sol2-unwind.h (x86_fallback_frame_state): Likewise.
>
>
> 2013-05-23 Eric Botcazou <[email protected]>
>
> * gnat.dg/fp_exception.adb: New test.
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University