diff options
author | Robert Dewar <dewar@adacore.com> | 2010-10-18 10:34:56 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-18 12:34:56 +0200 |
commit | adcf6b325095112c75af4dbb69628605dcaf2e32 (patch) | |
tree | 1b8e214d778fdfd8d8a13ab7a5c90cf30fac3388 /gcc/ada/s-stausa.adb | |
parent | 8918fe18ab24b24cba7575face37f1726a23ef19 (diff) | |
download | gcc-adcf6b325095112c75af4dbb69628605dcaf2e32.zip gcc-adcf6b325095112c75af4dbb69628605dcaf2e32.tar.gz gcc-adcf6b325095112c75af4dbb69628605dcaf2e32.tar.bz2 |
sinfo.ads, sinfo.adb: Change Has_Pragma_CPU to Flag14 (Flag10 is standard field).
2010-10-18 Robert Dewar <dewar@adacore.com>
* sinfo.ads, sinfo.adb: Change Has_Pragma_CPU to Flag14 (Flag10 is
standard field).
2010-10-18 Robert Dewar <dewar@adacore.com>
* s-stausa.adb, s-taprop-linux.adb, s-taprop-mingw.adb, s-tassta.ads:
Minor reformatting.
2010-10-18 Robert Dewar <dewar@adacore.com>
* exp_strm.adb (Build_Elementary_Input_Call): Check
No_Default_Stream_Attributes.
(Build_Elementary_Write_Call): Check No_Default_Stream_Attributes
* s-rident.ads: Add restriction No_Default_Stream_Attributes
Put restriction No_Allocators_After_Elaboration in alpha order
From-SVN: r165626
Diffstat (limited to 'gcc/ada/s-stausa.adb')
-rw-r--r-- | gcc/ada/s-stausa.adb | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/gcc/ada/s-stausa.adb b/gcc/ada/s-stausa.adb index d533e0c..e85bc46 100644 --- a/gcc/ada/s-stausa.adb +++ b/gcc/ada/s-stausa.adb @@ -263,10 +263,11 @@ package body System.Stack_Usage is Guard : constant Integer := 256; -- Guard space between the Current_Stack_Level'Address and the last -- allocated byte on the stack. + begin - if Analyzer.Top_Pattern_Mark /= 0 then - -- Easiest and most accurate method: the top of the stack is known. + -- Easiest and most accurate method: the top of the stack is known. + if Analyzer.Top_Pattern_Mark /= 0 then Analyzer.Pattern_Size := Stack_Size (Analyzer.Top_Pattern_Mark, To_Stack_Address (Current_Stack_Level'Address)) @@ -283,19 +284,23 @@ package body System.Stack_Usage is declare Pattern : aliased Stack_Slots - (1 .. Analyzer.Pattern_Size / Bytes_Per_Pattern); + (1 .. Analyzer.Pattern_Size / Bytes_Per_Pattern); for Pattern'Address use Analyzer.Stack_Overlay_Address; + begin if System.Parameters.Stack_Grows_Down then - for I in reverse Pattern'Range loop - Pattern (I) := Analyzer.Pattern; + for J in reverse Pattern'Range loop + Pattern (J) := Analyzer.Pattern; end loop; + Analyzer.Bottom_Pattern_Mark := To_Stack_Address (Pattern (Pattern'Last)'Address); + else - for I in Pattern'Range loop - Pattern (I) := Analyzer.Pattern; + for J in Pattern'Range loop + Pattern (J) := Analyzer.Pattern; end loop; + Analyzer.Bottom_Pattern_Mark := To_Stack_Address (Pattern (Pattern'First)'Address); end if; @@ -310,6 +315,7 @@ package body System.Stack_Usage is To_Stack_Address (Current_Stack_Level'Address)); if Stack_Used_When_Filling > Analyzer.Pattern_Size then + -- In this case, the known size of the stack is too small, we've -- already taken more than expected, so there's no possible -- computation |