Analysis of loop variant is known to lead to false alarms with CodePeer.
Add pragma Annotate in such a case which can be justified.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-exponu.adb (Exponu): Add annotation.
diff --git a/gcc/ada/libgnat/s-exponu.adb b/gcc/ada/libgnat/s-exponu.adb
--- a/gcc/ada/libgnat/s-exponu.adb
+++ b/gcc/ada/libgnat/s-exponu.adb
@@ -64,6 +64,9 @@ begin
pragma Loop_Invariant (Exp > 0);
pragma Loop_Invariant (Result * Factor ** Exp = Left ** Right);
pragma Loop_Variant (Decreases => Exp);
+ pragma Annotate
+ (CodePeer, False_Positive,
+ "validity check", "confusion on generated code");
if Exp rem 2 /= 0 then
pragma Assert