[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 809d468..04a4822 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 e9ed0d8..25d0e57 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