From 680a0a68ab666f5b65c5b423b2e0320edc441544 Mon Sep 17 00:00:00 2001 From: charlet Date: Tue, 30 Aug 2011 14:12:00 +0000 Subject: [PATCH] 2011-08-30 Robert Dewar * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment. Minor code reorg/reformatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178314 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/ChangeLog | 5 +++++ gcc/ada/exp_ch9.adb | 2 ++ gcc/ada/opt.ads | 25 ++++++++++++------------- gcc/ada/s-soflin.adb | 7 ++----- gcc/ada/sem_res.adb | 1 + 5 files changed, 22 insertions(+), 18 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 47a989f..e39ed6a 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2011-08-30 Robert Dewar + + * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment. + Minor code reorg/reformatting. + 2011-08-30 Yannick Moy * opt.adb, opt.ads (Full_Expander_Active): New function defines a diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb index 7620236..58d6df0 100644 --- a/gcc/ada/exp_ch9.adb +++ b/gcc/ada/exp_ch9.adb @@ -4905,6 +4905,7 @@ package body Exp_Ch9 is begin if Full_Expander_Active then + -- If we have no handled statement sequence, we may need to build -- a dummy sequence consisting of a null statement. This can be -- skipped if the trivial accept optimization is permitted. @@ -11504,6 +11505,7 @@ package body Exp_Ch9 is return; elsif Full_Expander_Active then + -- Associate discriminals with the first subprogram or entry body to -- be expanded. diff --git a/gcc/ada/opt.ads b/gcc/ada/opt.ads index 3bc4ad9..d50f77b 100644 --- a/gcc/ada/opt.ads +++ b/gcc/ada/opt.ads @@ -1832,14 +1832,6 @@ package Opt is -- behavior can be disabled using switch -gnatd.t which will set this flag -- to False and revert to the previous dynamic behavior. - function Full_Expander_Active return Boolean; - -- Returns the value of (Expander_Active and not ALFA_Mode). This "flag" - -- indicates that expansion is fully active, that is, not in the reduced - -- mode for Alfa (True) or that expansion is either deactivated, or active - -- in the reduced mode for Alfa (False). For more information on full - -- expansion, see package Expander. For more information on reduced - -- Alfa expansion, see package Exp_Alfa. - ----------------------- -- Tree I/O Routines -- ----------------------- @@ -1876,17 +1868,24 @@ package Opt is -- Used to store the ASIS version number read from a tree file to check if -- it is the same as stored in the ASIS version number in Tree_IO. - ---------------------------------- - -- Mode for Formal Verification -- - ---------------------------------- - - -- This mode is currently defined through a debug flag + ----------------------------------- + -- Modes for Formal Verification -- + ----------------------------------- ALFA_Mode : Boolean := False; -- Specific compiling mode targeting formal verification through the -- generation of Why code for those parts of the input code that belong to -- the ALFA subset of Ada. Set by debug flag -gnatd.F. + function Full_Expander_Active return Boolean; + pragma Inline (Full_Expander_Active); + -- Returns the value of (Expander_Active and not ALFA_Mode). This "flag" + -- indicates that expansion is fully active, that is, not in the reduced + -- mode for Alfa (True) or that expansion is either deactivated, or active + -- in the reduced mode for Alfa (False). For more information on full + -- expansion, see package Expander. For more information on reduced + -- Alfa expansion, see package Exp_Alfa. + private -- The following type is used to save and restore settings of switches in diff --git a/gcc/ada/s-soflin.adb b/gcc/ada/s-soflin.adb index f12ed9a..ca3df4a 100644 --- a/gcc/ada/s-soflin.adb +++ b/gcc/ada/s-soflin.adb @@ -120,11 +120,8 @@ package body System.Soft_Links is ---------------- procedure Create_TSD (New_TSD : in out TSD) is - use type Parameters.Size_Type; - - SS_Ratio_Dynamic : constant Boolean := - Parameters.Sec_Stack_Percentage = Parameters.Dynamic; - + use Parameters; + SS_Ratio_Dynamic : constant Boolean := Sec_Stack_Percentage = Dynamic; begin if SS_Ratio_Dynamic then SST.SS_Init diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index bf3814c..074f5f2 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -8095,6 +8095,7 @@ package body Sem_Res is Expander_Mode_Restore; -- In ALFA_Mode, no magic needed, we just resolve the underlying nodes + -- But why is this special handling for ALFA_Mode required ??? else Resolve (Condition (N), Typ); -- 2.7.4