From: Ronan Desplanques Date: Mon, 7 Apr 2025 08:19:24 +0000 (+0200) Subject: ada: Apply tweak for machine-code-based coverage X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c446b00d3130853b01bd7ada9b4c54eee13de52;p=thirdparty%2Fgcc.git ada: Apply tweak for machine-code-based coverage gcc/ada/ChangeLog: * libgnat/s-valuer.adb (Scan_Raw_Real): Apply tweak. --- diff --git a/gcc/ada/libgnat/s-valuer.adb b/gcc/ada/libgnat/s-valuer.adb index 2410b6bd4e1..cc1f778ee4e 100644 --- a/gcc/ada/libgnat/s-valuer.adb +++ b/gcc/ada/libgnat/s-valuer.adb @@ -614,7 +614,13 @@ package body System.Value_R is then Base_Char := Str (Index); - if N = 1 and then Value (1) in 2 .. 16 then + -- Functionally, "(Parts = 1 or else N = 1)" in the condition of the + -- following if statement could replaced by the simpler "N = 1". The + -- reason we use a more complicated expression is to accommodate + -- machine-code-based coverage tools: the simple version makes it + -- impossible to fully cover generic instances of System.Value_R with + -- Parts = 1. + if (Parts = 1 or else N = 1) and then Value (1) in 2 .. 16 then Base := Unsigned (Value (1)); else Base_Violation := True;