The special case used for catching the 'mod -1' operation is not useful
to CodePeer, and in fact may be detrimental to its precision. Remove
it in CodePeer_Mode.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

        * exp_ch4.adb (Expand_N_Op_Mod): Remove special case for mod -1
        in CodePeer_Mode.
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
--- a/gcc/ada/exp_ch4.adb
+++ b/gcc/ada/exp_ch4.adb
@@ -9626,6 +9626,7 @@ package body Exp_Ch4 is
 
             if ((not ROK) or else (Rlo <= (-1) and then (-1) <= Rhi))
               and then ((not LOK) or else (Llo = LLB))
+              and then not CodePeer_Mode
             then
                Rewrite (N,
                  Make_If_Expression (Loc,


Reply via email to