[Ada] Always do range check against 'First
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>
Tue, 29 May 2018 09:31:00 +0000 (09:31 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Tue, 29 May 2018 09:31:00 +0000 (09:31 +0000)
2018-05-29  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

gcc/ada/

* exp_ch4.adb (Expand_N_Op_Abs): Always do range check against 'First.

From-SVN: r260862

gcc/ada/ChangeLog
gcc/ada/exp_ch4.adb

index 809d468ebb74493b32e6b457524eca3273e7b922..04a4822208a1b05476f5c61f33fd8a2642377bf0 100644 (file)
@@ -1,3 +1,7 @@
+2018-05-29  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
+
+       * exp_ch4.adb (Expand_N_Op_Abs): Always do range check against 'First.
+
 2018-05-29  Eric Botcazou  <ebotcazou@adacore.com>
 
        * repinfo.adb (List_Entities): Do not list the Linker_Section for
index e9ed0d896261488c43f5711c47932076df273980..25d0e57e0ffe3df16b8b88059738a56367216e78 100644 (file)
@@ -6956,8 +6956,7 @@ package body Exp_Ch4 is
 
       --  Deal with software overflow checking
 
-      if not Backend_Overflow_Checks_On_Target
-        and then Is_Signed_Integer_Type (Etype (N))
+      if Is_Signed_Integer_Type (Etype (N))
         and then Do_Overflow_Check (N)
       then
          --  The only case to worry about is when the argument is equal to the