diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2013-07-08 09:55:24 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2013-07-08 09:55:24 +0200 |
commit | 08daa7828efe5443383b2553e964c21aaed17cdf (patch) | |
tree | 8e07c8e54d101174bf9cc82468e145979fcbbc1a | |
parent | 8d80ff64373eb64492469fbf4f0bf0043f9e0854 (diff) | |
download | gcc-08daa7828efe5443383b2553e964c21aaed17cdf.zip gcc-08daa7828efe5443383b2553e964c21aaed17cdf.tar.gz gcc-08daa7828efe5443383b2553e964c21aaed17cdf.tar.bz2 |
[multiple changes]
2013-07-08 Robert Dewar <dewar@adacore.com>
* exp_ch4.adb: Minor reformatting.
2013-07-08 Ed Schonberg <schonberg@adacore.com>
* 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
-rw-r--r-- | gcc/ada/ChangeLog | 12 | ||||
-rw-r--r-- | gcc/ada/exp_ch4.adb | 2 | ||||
-rw-r--r-- | gcc/ada/sem_ch4.adb | 5 |
3 files changed, 17 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 67275fe..20c35fa 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,15 @@ +2013-07-08 Robert Dewar <dewar@adacore.com> + + * exp_ch4.adb: Minor reformatting. + +2013-07-08 Ed Schonberg <schonberg@adacore.com> + + * 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 <dewar@adacore.com> * sem_ch8.adb, exp_ch3.adb: Minor reformatting. diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index f351b67..46cf44b 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 04db9b0..530fd00 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))); |