diff options
Diffstat (limited to 'gcc/ada/gcc-interface/cuintp.c')
-rw-r--r-- | gcc/ada/gcc-interface/cuintp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ada/gcc-interface/cuintp.c b/gcc/ada/gcc-interface/cuintp.c index c5736f5..1bf9c35 100644 --- a/gcc/ada/gcc-interface/cuintp.c +++ b/gcc/ada/gcc-interface/cuintp.c @@ -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 (TREE_INT_CST_HIGH (Input) < 0 && 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 |