> 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 ****************************.

Weird, this test shouldn't exercise the unwinder at all.  This might be 
related to the patch mentioned below...

> * 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

Patch collision.  After

2013-05-24  Eric Botcazou  <ebotca...@adacore.com>

        * gcc-interface/gigi.h (gnat_init_gcc_fp): Declare.
        * gcc-interface/trans.c (gigi): Call it.
        * gcc-interface/misc.c (gnat_init_gcc_fp): New function.

you need to compile with -ftrapping-math; revised testcase attached.

-- 
Eric Botcazou
-- { dg-do run { target *-*-solaris2.* } }
-- { dg-options "-ftrapping-math" }

procedure FP_Exception is

  type my_fixed is digits 15;
  for my_fixed'size use 64;
  fixed1 : my_fixed := 1.0;  
  fixed2 : my_fixed := -0.0;
  mask_all : constant integer := 16#1F#;

  procedure fpsetmask(mask : in integer);
  pragma IMPORT (C, fpsetmask, "fpsetmask");

begin 

  -- Mask all floating point exceptions so they can be trapped
  fpsetmask (mask_all);

  fixed1 := fixed1 / fixed2;

exception
  when others => null;
end;

Reply via email to