On 11/25/2013 03:46 AM, Eric Botcazou wrote:
Richi has asked the we break the wide-int patch so that the individual port
and front end maintainers can review their parts without have to go through
the entire patch.    This patch covers the ada front-end.
I don't think that the mechanical change in UI_From_gnu is correct, see the
comment just above.  The annotate_value change is very likely correct, but
please double check and, upon positive outcome, remove the last sentence of
the comment just above.  The rest looks good, thanks.

Eric,

you are correct - this was an incorrect change. I believe that the patch below would be correct, but it is impossible to test it because (i believe) that gcc no longer works if the host_bits_per_wide_int is 32. I could be wrong about this but if i am correct, what do you want me to do?

Kenny

Index: gcc/ada/gcc-interface/cuintp.c
===================================================================
--- gcc/ada/gcc-interface/cuintp.c    (revision 205374)
+++ gcc/ada/gcc-interface/cuintp.c    (working copy)
@@ -167,7 +167,7 @@ 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::lts_p (Input, 0) && TYPE_UNSIGNED (gnu_type))
+ else if (wi::gtu_p (wi::lrshift (Input, 63), 0) && TYPE_UNSIGNED (gnu_type))
     return No_Uint;
 #endif


Reply via email to