[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Thu, 31 Jul 2014 10:03:25 +0000 (12:03 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Thu, 31 Jul 2014 10:03:25 +0000 (12:03 +0200)
2014-07-31  Robert Dewar  <dewar@adacore.com>

* inline.adb, s-traceb.adb, s-traceb-hpux.adb, memtrack.adb,
s-traceb-mastop.adb: Minor reformatting.

2014-07-31  Ed Schonberg  <schonberg@adacore.com>

* exp_ch3.adb (Expand_Record_Extension): In ASIS_Mode perform
expansion, to handle properly visibility of selected components
in instance bodies.

From-SVN: r213337

gcc/ada/ChangeLog
gcc/ada/exp_ch3.adb
gcc/ada/inline.adb
gcc/ada/memtrack.adb
gcc/ada/s-traceb-hpux.adb
gcc/ada/s-traceb-mastop.adb
gcc/ada/s-traceb.adb

index f2b68c64568c2fca1657b5d9adbde4722d7a3a1a..ed63217ea099f2e3f2f03c9896abc3993d522af1 100644 (file)
@@ -1,3 +1,14 @@
+2014-07-31  Robert Dewar  <dewar@adacore.com>
+
+       * inline.adb, s-traceb.adb, s-traceb-hpux.adb, memtrack.adb,
+       s-traceb-mastop.adb: Minor reformatting.
+
+2014-07-31  Ed Schonberg  <schonberg@adacore.com>
+
+       * exp_ch3.adb (Expand_Record_Extension): In ASIS_Mode perform
+       expansion, to handle properly visibility of selected components
+       in instance bodies.
+
 2014-07-31  Robert Dewar  <dewar@adacore.com>
 
        * par-ch13.adb (Get_Aspect_Specifications): Set Inside_Depends.
index 60d4ba7244ddb61c4fc55b665fb2fd26d6dcc7e5..d404d377b6adc180c70373b3563b063a8bcc2479 100644 (file)
@@ -4588,8 +4588,10 @@ package body Exp_Ch3 is
    begin
       --  Expand_Record_Extension is called directly from the semantics, so
       --  we must check to see whether expansion is active before proceeding
+      --  Because this affects the visibility of selected components in bodies
+      --  of instances, it must also be called in ASIS mode.
 
-      if not Expander_Active then
+      if not (Expander_Active or ASIS_Mode) then
          return;
       end if;
 
index 0f28ec5be0940f88e2890fc1073b45eeeeb5c012..e0357027af5e51db1162836409a54ede16a3fb68 100644 (file)
@@ -1968,10 +1968,13 @@ package body Inline is
          ---------------------------
 
          function Has_Excluded_Contract return Boolean is
-
             function Check_Excluded_Contracts (E : Entity_Id) return Boolean;
             --  Return True if the subprogram E has unsupported contracts
 
+            ------------------------------
+            -- Check_Excluded_Contracts --
+            ------------------------------
+
             function Check_Excluded_Contracts (E : Entity_Id) return Boolean is
                Items : constant Node_Id := Contract (E);
 
@@ -1990,8 +1993,13 @@ package body Inline is
                return False;
             end Check_Excluded_Contracts;
 
+            --  Local declarations
+
             Decl : Node_Id;
             P_Id : Pragma_Id;
+
+         --  Start of processing for Has_Excluded_Contract
+
          begin
             if Check_Excluded_Contracts (Spec_Id)
               or else Check_Excluded_Contracts (Body_Id)
index be510f590291b58ecdfb85ee9797610d63c026fb..35ca8b26bfeff1ff11437ff2ffe44898ff222c7f 100644 (file)
@@ -196,8 +196,8 @@ package body System.Memory is
          end if;
 
          Timestamp := System.OS_Primitives.Clock;
-         Call_Chain (Tracebk, Max_Call_Stack, Num_Calls,
-                     Skip_Frames => 2);
+         Call_Chain
+           (Tracebk, Max_Call_Stack, Num_Calls, Skip_Frames => 2);
          fputc (Character'Pos ('A'), Gmemfile);
          fwrite (Result'Address, Address_Size, 1, Gmemfile);
          fwrite (Actual_Size'Address, size_t'Max_Size_In_Storage_Elements, 1,
@@ -262,8 +262,8 @@ package body System.Memory is
             Gmem_Initialize;
          end if;
 
-         Call_Chain (Tracebk, Max_Call_Stack, Num_Calls,
-                     Skip_Frames => 2);
+         Call_Chain
+           (Tracebk, Max_Call_Stack, Num_Calls, Skip_Frames => 2);
          Timestamp := System.OS_Primitives.Clock;
          fputc (Character'Pos ('D'), Gmemfile);
          fwrite (Addr'Address, Address_Size, 1, Gmemfile);
@@ -345,8 +345,8 @@ package body System.Memory is
          if Needs_Init then
             Gmem_Initialize;
          end if;
-         Call_Chain (Tracebk, Max_Call_Stack, Num_Calls,
-                     Skip_Frames => 2);
+         Call_Chain
+           (Tracebk, Max_Call_Stack, Num_Calls, Skip_Frames => 2);
          Timestamp := System.OS_Primitives.Clock;
          fputc (Character'Pos ('D'), Gmemfile);
          fwrite (Addr'Address, Address_Size, 1, Gmemfile);
index 52bca4cea0431117c7fc5a0611c73c4c866d3d6c..9987cb3fe6466a8588850297a69e26cabef5d6c2 100644 (file)
@@ -618,8 +618,11 @@ package body System.Traceback is
    begin
       Call_Chain
         (Traceback'Address, Max_Len, Len,
-         Exclude_Min, Exclude_Max, Skip_Frames + 1);
-      --  Skip one extra frame so we skip the other Call_Chain as well
+         Exclude_Min, Exclude_Max,
+
+         --  Skip one extra frame to skip the other Call_Chain entry as well
+
+         Skip_Frames => Skip_Frames + 1);
    end Call_Chain;
 
 end System.Traceback;
index 79b8eccc61a53e59764eac71d956a96a47e4181f..0ce7c50f933a0f02383c76e45e98878a8e2302a3 100644 (file)
@@ -114,8 +114,11 @@ package body System.Traceback is
    begin
       Call_Chain
         (Traceback'Address, Max_Len, Len,
-         Exclude_Min, Exclude_Max, Skip_Frames + 1);
-      --  Skip one extra frame so we skip the other Call_Chain as well
+         Exclude_Min, Exclude_Max,
+
+         --  Skip one extra frame to skip the other Call_Chain entry as well
+
+         Skip_Frames => Skip_Frames + 1);
    end Call_Chain;
 
    ------------------
index 78c759b993251e429b810e5288c364ccbccc1e57..0a8726c659621eddecc521e7f8dfad951d6daef2 100644 (file)
@@ -109,8 +109,11 @@ package body System.Traceback is
    begin
       Call_Chain
         (Traceback'Address, Max_Len, Len,
-         Exclude_Min, Exclude_Max, Skip_Frames + 1);
-      --  Skip one extra frame so we skip the other Call_Chain as well
+         Exclude_Min, Exclude_Max,
+
+         --  Skip one extra frame to skip the other Call_Chain entry as well
+
+         Skip_Frames => Skip_Frames + 1);
    end Call_Chain;
 
 end System.Traceback;