diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-04 10:03:31 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-04 10:03:31 +0000 |
commit | ac5f5168a974437091584b6b55f06c5abc920f72 (patch) | |
tree | 8573ab03acf640bc3322d78ca3cb883e6c81a7b9 /gcc/ada/checks.adb | |
parent | f38e6bcb032e833ce170dfacfe59ec74026cb8f6 (diff) | |
download | gcc-ac5f5168a974437091584b6b55f06c5abc920f72.tar.gz |
2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch3.adb (Build_CPP_Init_Procedure): Remove
Flag_Decl. Do not analyze the declaration of the flag as it is
not part of the tree yet, instead add it to the freeze actions
of the C++ type.
2014-08-04 Robert Dewar <dewar@adacore.com>
* checks.adb (Apply_Scalar_Range_Check): Make sure we handle
case of OUT and IN OUT parameter correctly (where Source_Typ is
set), we were missing one case where a check must be applied.
2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch8.adb (Build_Class_Wide_Wrapper): Update the comment on
the generated code. Instead of hiding the renaming and using the
wrapper as the proper association, have the subprogram renaming
alias the wrapper.
(Build_Spec): The entity of the wrapper is
now derived from the entity of the related primitive.
2014-08-04 Emmanuel Briot <briot@adacore.com>
* s-regpat.adb: s-regpat.adb (Parse): fix incorrect link when
using non-capturing groups.
2014-08-04 Ed Schonberg <schonberg@adacore.com>
* inline.adb (Build_Body_To_Inline): Remove Unmodified and
related pragmas before copying the original body, to prevent
spurious errors when the pragmas apply to formals that will not
appear in the inlined body.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213554 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/checks.adb')
-rw-r--r-- | gcc/ada/checks.adb | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb index 8072629666d..05f4b7e476a 100644 --- a/gcc/ada/checks.adb +++ b/gcc/ada/checks.adb @@ -2971,11 +2971,18 @@ package body Checks is and then Is_Discrete_Type (S_Typ) = Is_Discrete_Type (Target_Typ) and then (In_Subrange_Of (S_Typ, Target_Typ, Fixed_Int) + + -- Also check if the expression itself is in the range of the + -- target type if it is a known at compile time value. We skip + -- this test if S_Typ is set since for OUT and IN OUT parameters + -- the Expr itself is not relevant to the checking. + or else - Is_In_Range (Expr, Target_Typ, - Assume_Valid => True, - Fixed_Int => Fixed_Int, - Int_Real => Int_Real)) + (No (Source_Typ) + and then Is_In_Range (Expr, Target_Typ, + Assume_Valid => True, + Fixed_Int => Fixed_Int, + Int_Real => Int_Real))) then return; |