Ada system.fat_lflt.fat_long_float.scaling problem analysis

Laurent GUERBY laurent@guerby.net
Fri Sep 17 21:34:00 GMT 2004


On Fri, 2004-09-17 at 22:39, Robert Dewar wrote:
> This does not look like a bug to me, but in any case, surely
> the proper procedure is to file a bug report!

Well technically it's a regression shown by the testsuite
in CVS, are you suggesting I file a PR in GCC bugzilla
or to ACT?

Very similar code is present in GNAT sources and is causing the ACATS
failures, see s-fatgen.adb, function Valid:

      XA : constant System.Address := To_Address (Float_Access (X));

      R : Float_Rep;
      pragma Import (Ada, R);
      for R'Address use XA;
      --  R is a view of the input floating-point parameter. Note that we
      --  must avoid copying the actual bits of this parameter in float
      --  form (since it may be a signalling NaN.

(I believe it's your code BTW, and the comment misses a closing parenthesis :) 

Since it's a generic, it might lead to generated code
as I've writen in my example if multiple instanciation
are present. Such a construct has worked for all versions of GNAT, but might depend
on some specific code generation behaviour that is no longer present.

Laurent



More information about the Gcc mailing list