diff options
| author | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-04 15:54:52 +0200 |
|---|---|---|
| committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-04 15:54:52 +0200 |
| commit | 1f9939b5d9f5722d18fc84139826b2d8845a68c2 (patch) | |
| tree | 9ba8c776b625b0e2d8de3d8711b53c866e0052df /gcc/ada/lib-xref-alfa.adb | |
| parent | 15d8a51dee9e80190ac43afc9b553976776e17a9 (diff) | |
| download | gcc-1f9939b5d9f5722d18fc84139826b2d8845a68c2.zip gcc-1f9939b5d9f5722d18fc84139826b2d8845a68c2.tar.gz gcc-1f9939b5d9f5722d18fc84139826b2d8845a68c2.tar.bz2 | |
[multiple changes]
2011-08-04 Yannick Moy <moy@adacore.com>
* sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
(Analyze_Pragma): allow static string expression for name of Test_Case,
instead of simply string literals.
* sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
expressions.
2011-08-04 Vincent Celier <celier@adacore.com>
* makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
case suffixes to find truncated main sources.
2011-08-04 Tristan Gingold <gingold@adacore.com>
* impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
(Compute_Current_Task): Ditto.
2011-08-04 Tristan Gingold <gingold@adacore.com>
* gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
2011-08-04 Yannick Moy <moy@adacore.com>
* lib-xref-alfa.adb (Is_Global_Constant): new function that detects
library-level constant.
(Add_ALFA_Xrefs): ignore global constants in ALFA xref.
* sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
used as selector of parameter association, in ALFA mode.
From-SVN: r177389
Diffstat (limited to 'gcc/ada/lib-xref-alfa.adb')
| -rw-r--r-- | gcc/ada/lib-xref-alfa.adb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/ada/lib-xref-alfa.adb b/gcc/ada/lib-xref-alfa.adb index 77da460..0e0a4ff 100644 --- a/gcc/ada/lib-xref-alfa.adb +++ b/gcc/ada/lib-xref-alfa.adb @@ -524,6 +524,10 @@ package body ALFA is function Is_ALFA_Scope (E : Entity_Id) return Boolean; -- Return whether the entity or reference scope is adequate + function Is_Global_Constant (E : Entity_Id) return Boolean; + -- Return True if E is a global constant for which we should ignore + -- reads in ALFA. + ------------------- -- Is_ALFA_Scope -- ------------------- @@ -536,6 +540,16 @@ package body ALFA is and then Get_Scope_Num (E) /= No_Scope; end Is_ALFA_Scope; + ------------------------ + -- Is_Global_Constant -- + ------------------------ + + function Is_Global_Constant (E : Entity_Id) return Boolean is + begin + return Ekind (E) in E_Constant + and then Ekind_In (Scope (E), E_Package, E_Package_Body); + end Is_Global_Constant; + -- Start of processing for Eliminate_Before_Sort begin @@ -547,6 +561,7 @@ package body ALFA is and then ALFA_References (Xrefs.Table (Rnums (J)).Typ) and then Is_ALFA_Scope (Xrefs.Table (Rnums (J)).Ent_Scope) and then Is_ALFA_Scope (Xrefs.Table (Rnums (J)).Ref_Scope) + and then not Is_Global_Constant (Xrefs.Table (Rnums (J)).Ent) then Nrefs := Nrefs + 1; Rnums (Nrefs) := Rnums (J); |
