[Ada] Do not catch 'N rem -1' in CodePeer_Mode
authorBoris Yakobowski <yakobowski@adacore.com>
Wed, 21 Apr 2021 12:49:15 +0000 (14:49 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 5 Jul 2021 13:09:07 +0000 (13:09 +0000)
gcc/ada/

* exp_ch4.adb (Expand_N_Op_Rem): Remove special case for rem -1
in CodePeer_Mode.

gcc/ada/exp_ch4.adb

index a9fc270..54e91b2 100644 (file)
@@ -10393,7 +10393,9 @@ package body Exp_Ch4 is
       --  types and this is really marginal). We will just assume that we need
       --  the test if the left operand can be negative at all.
 
-      if Lneg and Rneg then
+      if (Lneg and Rneg)
+         and then not CodePeer_Mode
+      then
          Rewrite (N,
            Make_If_Expression (Loc,
              Expressions => New_List (