summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_elab.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-22 10:31:30 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-22 10:31:30 +0000
commita67a63e2f256e0ea10297c519be188f09c4a8189 (patch)
tree7a679922c3da9b4129f120983a84f5f7406ef2d3 /gcc/ada/sem_elab.adb
parent721cc2027b17be0c98236340d7d957899bb3c2ba (diff)
downloadgcc-a67a63e2f256e0ea10297c519be188f09c4a8189.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149925 138bc75d-0d04-0410-961f-82ee72b054a4
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 60a07322dc4..1e278a6bb58 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);