From: Richard Kenner Date: Tue, 29 May 2018 09:31:00 +0000 (+0000) Subject: [Ada] Always do range check against 'First X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d8eb4ac4579d1af6e2aff7cbdb85a9c365680d4a;p=gcc.git [Ada] Always do range check against 'First 2018-05-29 Richard Kenner gcc/ada/ * exp_ch4.adb (Expand_N_Op_Abs): Always do range check against 'First. From-SVN: r260862 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 809d468ebb7..04a4822208a 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,7 @@ +2018-05-29 Richard Kenner + + * exp_ch4.adb (Expand_N_Op_Abs): Always do range check against 'First. + 2018-05-29 Eric Botcazou * repinfo.adb (List_Entities): Do not list the Linker_Section for diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index e9ed0d89626..25d0e57e0ff 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -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