* [Ada] Shutdown codepeer message
@ 2021-10-25 15:09 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-10-25 15:09 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 202 bytes --]
Which is a false positive, caused by a confusion on the expanded code
for pragma Loop_Variant.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-widthu.adb: Add pragma Annotate.
[-- Attachment #2: patch.diff --]
[-- Type: text/x-diff, Size: 660 bytes --]
diff --git a/gcc/ada/libgnat/s-widthu.adb b/gcc/ada/libgnat/s-widthu.adb
--- a/gcc/ada/libgnat/s-widthu.adb
+++ b/gcc/ada/libgnat/s-widthu.adb
@@ -134,10 +134,13 @@ begin
W := W + 1;
Pow := Pow * 10;
- pragma Loop_Variant (Decreases => T);
pragma Loop_Invariant (W in 3 .. Max_W + 3);
pragma Loop_Invariant (Pow = Big_10 ** (W - 2));
pragma Loop_Invariant (Big (T) = Big (T_Init) / Pow);
+ pragma Loop_Variant (Decreases => T);
+ pragma Annotate
+ (CodePeer, False_Positive,
+ "validity check", "confusion on generated code");
end loop;
declare
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-25 15:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-25 15:09 [Ada] Shutdown codepeer message Pierre-Marie de Rodat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).