[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Mon, 8 Jul 2013 07:55:24 +0000 (09:55 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Mon, 8 Jul 2013 07:55:24 +0000 (09:55 +0200)
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

gcc/ada/ChangeLog
gcc/ada/exp_ch4.adb
gcc/ada/sem_ch4.adb

index 67275fe6886aeab9d714d22a8e0b704d381f5ee4..20c35fa5897037ed40b01fc1f37cb40c911905c2 100644 (file)
@@ -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.
index f351b67f6d003de03a53916ae14660fa83933d9a..46cf44b98dfae74f1039f31cb9743cbe3d23c195 100644 (file)
@@ -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
index 04db9b0d39192608c1c67501d4c9ce34c25698c5..530fd007f05d14bd1a771e1398cf5bd02726f347 100644 (file)
@@ -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)));