ada: Add guard to System.Val_Real.Large_Powfive against pathological input
There is no need to keep multiplying the result once it saturates to +Inf. gcc/ada/ChangeLog: * libgnat/s-powflt.ads (Maxpow_Exact): Minor comment fix. * libgnat/s-powlfl.ads (Maxpow_Exact): Likewise. * libgnat/s-powllf.ads (Maxpow_Exact): Likewise. * libgnat/s-valrea.adb (Large_Powfive) [1 parameter]: Exit the loop as soon as the result saturates to +Inf. (Large_Powfive) [2 parameters]: Likewise.
Showing
- gcc/ada/libgnat/s-powflt.ads 1 addition, 1 deletiongcc/ada/libgnat/s-powflt.ads
- gcc/ada/libgnat/s-powlfl.ads 1 addition, 1 deletiongcc/ada/libgnat/s-powlfl.ads
- gcc/ada/libgnat/s-powllf.ads 2 additions, 2 deletionsgcc/ada/libgnat/s-powllf.ads
- gcc/ada/libgnat/s-valrea.adb 16 additions, 0 deletionsgcc/ada/libgnat/s-valrea.adb
Loading
Please register or sign in to comment