summaryrefslogtreecommitdiff
path: root/gcc/ada/freeze.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-29 10:02:08 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-29 10:02:08 +0000
commit9c0fda1896485858ee0763b517ed856826153983 (patch)
treeabc00a0f2d80da97f7ea687746ed421e73d91083 /gcc/ada/freeze.adb
parent57acff55fe858d74d732dbe8c9e4829ff4415aa3 (diff)
downloadgcc-9c0fda1896485858ee0763b517ed856826153983.tar.gz
2011-08-29 Matthew Heaney <heaney@adacore.com>
* a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check for sibling when common parent. 2011-08-29 Thomas Quinot <quinot@adacore.com> * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with "pragma_". 2011-08-29 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions for the return type when in ASIS mode. 2011-08-29 Vincent Celier <celier@adacore.com> * make.adb (Gnatmake): Get the default search dirs, then the target parameters after getting the Builder switches, as the Builder switches may include --RTS= and that could change the default search dirs. 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of Make_Final_Call. Move the processing for class-wide types before the processing for derivations from [Limited_]Controlled. (Make_Final_Call): Move the processing for class-wide types before the processing for derivations from [Limited_]Controlled. * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check. Add code to account for alignments larger than the list header. Add a comment illustrating the structure of the allocated object + padding + header. (Deallocate_Any_Controlled): Add code to account for alignments larger than the list header. 2011-08-29 Ed Schonberg <schonberg@adacore.com> * sinfo.ads, sinfo.adb: New node kind N_Formal_Incomplete_Type_Definition, related flags. par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition): Parse formal incomplete types. * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in sem_ch12. * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body): Formal incomplete types do not need completion. * sem_ch12.adb (Analyze_Formal_Incomplete_Type, Validate_Incomplete_Type_Instance): New procedures to handle formal incomplete types. * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual that corresponds to a formal incomplete type. * sprint.adb: Handle formal incomplete type declarations. * exp_util.adb (Insert_Actions): An incomplete_type_definition is not an insertion point. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178184 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/freeze.adb')
-rw-r--r--gcc/ada/freeze.adb19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb
index 3532f096c98..3d366fd3c09 100644
--- a/gcc/ada/freeze.adb
+++ b/gcc/ada/freeze.adb
@@ -1259,6 +1259,13 @@ package body Freeze is
End_Package_Scope (E);
+ if Is_Generic_Instance (E)
+ and then Has_Delayed_Freeze (E)
+ then
+ Set_Has_Delayed_Freeze (E, False);
+ Expand_N_Package_Declaration (Unit_Declaration_Node (E));
+ end if;
+
elsif Ekind (E) in Task_Kind
and then
(Nkind (Parent (E)) = N_Task_Type_Declaration
@@ -2297,6 +2304,17 @@ package body Freeze is
elsif Inside_A_Generic and then External_Ref_In_Generic (Test_E) then
return No_List;
+ -- AI05-0213: a formal incomplete type does not freeze the actual.
+ -- In the instance, the same applies to the subtype that renames
+ -- the actual.
+
+ elsif Is_Private_Type (E)
+ and then Is_Generic_Actual_Type (E)
+ and then No (Full_View (Base_Type (E)))
+ and then Ada_Version >= Ada_2012
+ then
+ return No_List;
+
-- Do not freeze a global entity within an inner scope created during
-- expansion. A call to subprogram E within some internal procedure
-- (a stream attribute for example) might require freezing E, but the
@@ -2385,6 +2403,7 @@ package body Freeze is
if Nkind (Ritem) = N_Aspect_Specification
and then Entity (Ritem) = E
and then Is_Delayed_Aspect (Ritem)
+ and then Scope (E) = Current_Scope
then
Aitem := Aspect_Rep_Item (Ritem);