From 051378617c7c9093275018fb0c471f006072c507 Mon Sep 17 00:00:00 2001 From: charlet Date: Thu, 31 Jul 2014 10:03:25 +0000 Subject: [PATCH] 2014-07-31 Robert Dewar * inline.adb, s-traceb.adb, s-traceb-hpux.adb, memtrack.adb, s-traceb-mastop.adb: Minor reformatting. 2014-07-31 Ed Schonberg * exp_ch3.adb (Expand_Record_Extension): In ASIS_Mode perform expansion, to handle properly visibility of selected components in instance bodies. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213337 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/ChangeLog | 11 +++++++++++ gcc/ada/exp_ch3.adb | 4 +++- gcc/ada/inline.adb | 10 +++++++++- gcc/ada/memtrack.adb | 12 ++++++------ gcc/ada/s-traceb-hpux.adb | 7 +++++-- gcc/ada/s-traceb-mastop.adb | 7 +++++-- gcc/ada/s-traceb.adb | 7 +++++-- 7 files changed, 44 insertions(+), 14 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index f2b68c6..ed63217 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,16 @@ 2014-07-31 Robert Dewar + * inline.adb, s-traceb.adb, s-traceb-hpux.adb, memtrack.adb, + s-traceb-mastop.adb: Minor reformatting. + +2014-07-31 Ed Schonberg + + * 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 + * par-ch13.adb (Get_Aspect_Specifications): Set Inside_Depends. * par-ch2.adb (P_Pragma): Set Inside_Depends. * par-ch4.adb (P_Simple_Expression): Pass Inside_Depends to diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb index 60d4ba7..d404d37 100644 --- a/gcc/ada/exp_ch3.adb +++ b/gcc/ada/exp_ch3.adb @@ -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; diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb index 0f28ec5..e035702 100644 --- a/gcc/ada/inline.adb +++ b/gcc/ada/inline.adb @@ -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) diff --git a/gcc/ada/memtrack.adb b/gcc/ada/memtrack.adb index be510f5..35ca8b2 100644 --- a/gcc/ada/memtrack.adb +++ b/gcc/ada/memtrack.adb @@ -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); diff --git a/gcc/ada/s-traceb-hpux.adb b/gcc/ada/s-traceb-hpux.adb index 52bca4c..9987cb3 100644 --- a/gcc/ada/s-traceb-hpux.adb +++ b/gcc/ada/s-traceb-hpux.adb @@ -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; diff --git a/gcc/ada/s-traceb-mastop.adb b/gcc/ada/s-traceb-mastop.adb index 79b8ecc..0ce7c50 100644 --- a/gcc/ada/s-traceb-mastop.adb +++ b/gcc/ada/s-traceb-mastop.adb @@ -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; ------------------ diff --git a/gcc/ada/s-traceb.adb b/gcc/ada/s-traceb.adb index 78c759b..0a8726c 100644 --- a/gcc/ada/s-traceb.adb +++ b/gcc/ada/s-traceb.adb @@ -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; -- 2.7.4