From 08daa7828efe5443383b2553e964c21aaed17cdf Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Mon, 8 Jul 2013 09:55:24 +0200 Subject: [PATCH] [multiple changes] 2013-07-08 Robert Dewar * exp_ch4.adb: Minor reformatting. 2013-07-08 Ed Schonberg * sem_ch4.adb (Complete_Object_Operation): In ASIS mode, if the parent node is a selected component and the analysis as a call is successful, set the type of the selector in the parent node for subsequent checks, because the rewriting of the node does not take place during pre-analysis. From-SVN: r200761 --- gcc/ada/ChangeLog | 12 ++++++++++++ gcc/ada/exp_ch4.adb | 2 +- gcc/ada/sem_ch4.adb | 5 ++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 67275fe6886..20c35fa5897 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,15 @@ +2013-07-08 Robert Dewar + + * exp_ch4.adb: Minor reformatting. + +2013-07-08 Ed Schonberg + + * sem_ch4.adb (Complete_Object_Operation): In ASIS mode, if + the parent node is a selected component and the analysis as a + call is successful, set the type of the selector in the parent + node for subsequent checks, because the rewriting of the node + does not take place during pre-analysis. + 2013-07-08 Robert Dewar * sem_ch8.adb, exp_ch3.adb: Minor reformatting. diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index f351b67f6d0..46cf44b98df 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -2835,7 +2835,7 @@ package body Exp_Ch4 is elsif Ada_Version >= Ada_2012 or else Is_Bounded_String (Typ) then - -- if no TSS has been created for the type, check whether there is + -- If no TSS has been created for the type, check whether there is -- a primitive equality declared for it. declare diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb index 04db9b0d391..530fd007f05 100644 --- a/gcc/ada/sem_ch4.adb +++ b/gcc/ada/sem_ch4.adb @@ -7200,12 +7200,15 @@ package body Sem_Ch4 is -- For cross-reference purposes, treat the new node as being in -- the source if the original one is. Set entity and type, even -- though they may be overwritten during resolution if overloaded. + -- Perform the same transformation in ASIS mode, because during + -- pre-analysis of a pre/post condition the node will not be + -- rewritten as a call. Set_Comes_From_Source (Subprog, Comes_From_Source (N)); Set_Comes_From_Source (Call_Node, Comes_From_Source (N)); if Nkind (N) = N_Selected_Component - and then not Inside_A_Generic + and then (not Inside_A_Generic or ASIS_Mode) then Set_Entity (Selector_Name (N), Entity (Subprog)); Set_Etype (Selector_Name (N), Etype (Entity (Subprog))); -- 2.30.2