aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_elab.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2009-07-22 12:31:30 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2009-07-22 12:31:30 +0200
commitf625663199e1b11f1e7e90ca7b47e53bbbc94450 (patch)
tree7a679922c3da9b4129f120983a84f5f7406ef2d3 /gcc/ada/sem_elab.adb
parent4eb317ccce4caa81eba08a2aedad4849c7ea489c (diff)
downloadgcc-f625663199e1b11f1e7e90ca7b47e53bbbc94450.zip
gcc-f625663199e1b11f1e7e90ca7b47e53bbbc94450.tar.gz
gcc-f625663199e1b11f1e7e90ca7b47e53bbbc94450.tar.bz2
[multiple changes]
2009-07-22 Thomas Quinot <quinot@adacore.com> * sem_elab.adb (Insert_Elab_Check): When relocating an overloaded expression to insert an elab check using a conditional expression, be sure to carry the original list of interpretations to the new location. 2009-07-22 Gary Dismukes <dismukes@adacore.com> * gnat1drv.adb: Fix spelling error. 2009-07-22 Javier Miranda <miranda@adacore.com> * sem_type.ads, sem_type.adb (In_Generic_Actual): Leave this subprogram at the library level and fix a hidden bug in its implementation: its functionality for renaming objects was broken because N_Object_Renaming_Declarations nodes are not a subclass of N_Declaration nodes (as documented in sinfo.ads). * sem_util.adb (Check_Dynamically_Tagged_Expression): Include in this check nodes that are actuals of generic instantiations. 2009-07-22 Ed Schonberg <schonberg@adacore.com> * sinfo.ads, sinfo.adb (Pending_Context): New flag to indicate that the context of a compilation unit is being analyzed. Used to detect circularities created by with_clauses that are not detected by the loading machinery. * sem_ch10.adb (Analyze_Compilation_Unit): Set Pending_Context before analyzing the context of the current compilation unit, to detect possible circularities created by with_clauses. From-SVN: r149925
Diffstat (limited to 'gcc/ada/sem_elab.adb')
-rw-r--r--gcc/ada/sem_elab.adb14
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/ada/sem_elab.adb b/gcc/ada/sem_elab.adb
index 60a0732..1e278a6 100644
--- a/gcc/ada/sem_elab.adb
+++ b/gcc/ada/sem_elab.adb
@@ -47,6 +47,7 @@ with Sem_Cat; use Sem_Cat;
with Sem_Ch7; use Sem_Ch7;
with Sem_Ch8; use Sem_Ch8;
with Sem_Res; use Sem_Res;
+with Sem_Type; use Sem_Type;
with Sem_Util; use Sem_Util;
with Sinfo; use Sinfo;
with Sinput; use Sinput;
@@ -939,9 +940,7 @@ package body Sem_Elab is
Insert_Elab_Check (N,
Make_Attribute_Reference (Loc,
Attribute_Name => Name_Elaborated,
- Prefix =>
- New_Occurrence_Of
- (Spec_Entity (E_Scope), Loc)));
+ Prefix => New_Occurrence_Of (Spec_Entity (E_Scope), Loc)));
end if;
-- Case of static elaboration model
@@ -2415,8 +2414,7 @@ package body Sem_Elab is
Make_Attribute_Reference (Loc,
Attribute_Name => Name_Elaborated,
Prefix =>
- New_Occurrence_Of
- (Spec_Entity (Task_Scope), Loc)));
+ New_Occurrence_Of (Spec_Entity (Task_Scope), Loc)));
end if;
else
@@ -2852,6 +2850,8 @@ package body Sem_Elab is
Make_Raise_Program_Error (Loc,
Reason => PE_Access_Before_Elaboration);
+ Reloc_N : Node_Id;
+
begin
Set_Etype (R, Typ);
@@ -2859,9 +2859,11 @@ package body Sem_Elab is
Rewrite (N, R);
else
+ Reloc_N := Relocate_Node (N);
+ Save_Interps (N, Reloc_N);
Rewrite (N,
Make_Conditional_Expression (Loc,
- Expressions => New_List (C, Relocate_Node (N), R)));
+ Expressions => New_List (C, Reloc_N, R)));
end if;
Analyze_And_Resolve (N, Typ);