[Ada] Adjust support for 128-bit integer types in System.Random_Numbers
Pierre-Marie de Rodat
Wed Nov 25 13:27:24 GMT 2020
While the default function returning 128-bit integer works correctly,
Random_Discrete does not if it is instantiated on a 128-bit integer,
since the magnitude of the returned numbers is still 64 bits.
Note that no counterpart is needed in GNAT.Random_Numbers because the
homonymous function in there is just a forwarder for the original one.
Tested on x86_64-pc-linux-gnu, committed on trunk
* libgnat/s-rannum.adb (Random_Discrete): Specifically deal with
the case where the size of the base type is larger than 64 bits.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1623 bytes
Desc: not available
More information about the Gcc-patches