wide-int, ada

Eric Botcazou ebotcazou@adacore.com
Fri Apr 25 08:50:00 GMT 2014


> So, given the last change, the remaining bit is:
> 
> Index: gcc/ada/gcc-interface/cuintp.c
> ===================================================================
> --- gcc/ada/gcc-interface/cuintp.c	(revision 209754)
> +++ gcc/ada/gcc-interface/cuintp.c	(working copy)
> @@ -160,7 +160,11 @@ UI_From_gnu (tree Input)
>       in a signed 64-bit integer.  */
>    if (tree_fits_shwi_p (Input))
>      return UI_From_Int (tree_to_shwi (Input));
> -  else if (wi::neg_p (Input) && TYPE_UNSIGNED (gnu_type))
> +
> +  gcc_assert (TYPE_PRECISION (gnu_type) <= 64);
> +  if (TYPE_UNSIGNED (gnu_type)
> +      && TYPE_PRECISION (gnu_type) == 64
> +      && wi::neg_p (Input, SIGNED))
>      return No_Uint;
>  #endif
> 
> We need this to ensure that 32 to 63 bit values with the high bit set don’t
> return No_Uint.  This should also address the performance concerns as well.

OK, thanks.

-- 
Eric Botcazou



More information about the Gcc-patches mailing list