diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-10-26 13:01:25 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-10-26 13:01:25 +0000 |
commit | 754914462a18ffa362d224f0bac5dabfdc16ccfd (patch) | |
tree | cc393328bff9bf65326ec0f0c5b7c3d5818f52ec /gcc/ada/sem_eval.adb | |
parent | b0920a576ba898b7373b2678f727a2e6a4ab59bd (diff) | |
download | gcc-754914462a18ffa362d224f0bac5dabfdc16ccfd.tar.gz |
2015-10-26 Javier Miranda <miranda@adacore.com>
* exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Return False when
generating C code.
* sem_ch3.adb: Fix typos.
2015-10-26 Bob Duff <duff@adacore.com>
* sem_ch13.adb (Build_Predicate_Functions): Change the
structure of the predicate functions to reflect the requirements
of AI12-0071.
(Add_Condition): New procedure to do the "and-then-ing" in Add_Call
and Add_Predicates.
* einfo.ads (Static_Real_Or_String_Predicate): Change the
documentation to reflect the new structure.
* sem_eval.adb (Real_Or_String_Static_Predicate_Matches):
Change the walking of the predicate expression to reflect the
new structure.
* exp_util.adb: Minor comment fix.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229352 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_eval.adb')
-rw-r--r-- | gcc/ada/sem_eval.adb | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/ada/sem_eval.adb b/gcc/ada/sem_eval.adb index c4fe7687626..5110f16b4de 100644 --- a/gcc/ada/sem_eval.adb +++ b/gcc/ada/sem_eval.adb @@ -5408,13 +5408,14 @@ package body Sem_Eval is -- First deal with special case of inherited predicate, where the -- predicate expression looks like: - -- Expr and then xxPredicate (typ (Ent)) + -- xxPredicate (typ (Ent)) and then Expr -- where Expr is the predicate expression for this level, and the - -- right operand is the call to evaluate the inherited predicate. + -- left operand is the call to evaluate the inherited predicate. if Nkind (Expr) = N_And_Then - and then Nkind (Right_Opnd (Expr)) = N_Function_Call + and then Nkind (Left_Opnd (Expr)) = N_Function_Call + and then Is_Predicate_Function (Entity (Name (Left_Opnd (Expr)))) then -- OK we have the inherited case, so make a call to evaluate the -- inherited predicate. If that fails, so do we! @@ -5422,14 +5423,14 @@ package body Sem_Eval is if not Real_Or_String_Static_Predicate_Matches (Val => Val, - Typ => Etype (First_Formal (Entity (Name (Right_Opnd (Expr)))))) + Typ => Etype (First_Formal (Entity (Name (Left_Opnd (Expr)))))) then return False; end if; - -- Use the left operand for the continued processing + -- Use the right operand for the continued processing - Copy := Copy_Separate_Tree (Left_Opnd (Expr)); + Copy := Copy_Separate_Tree (Right_Opnd (Expr)); -- Case where call to predicate function appears on its own (this means -- that the predicate at this level is just inherited from the parent). |