[multiple changes]

2009-04-07  Javier Miranda  <miranda@adacore.com>

	* sem_ch3.adb (Build_Derived_Record_Type): When processing a tagged
	derived type that has discriminants, propagate the list of interfaces
	to the corresponding new base type. In addition, propagate also
	attribute Limited_Present (found working in this patch).

2009-04-07  Robert Dewar  <dewar@adacore.com>

	* exp_ch4.adb: Rewrite concatenation expansion.

From-SVN: r145684
This commit is contained in:
Arnaud Charlet 2009-04-07 17:46:23 +02:00
parent 8dbd1460a4
commit fdac1f80d6
3 changed files with 300 additions and 730 deletions

View File

@ -1,3 +1,14 @@
2009-04-07 Javier Miranda <miranda@adacore.com>
* sem_ch3.adb (Build_Derived_Record_Type): When processing a tagged
derived type that has discriminants, propagate the list of interfaces
to the corresponding new base type. In addition, propagate also
attribute Limited_Present (found working in this patch).
2009-04-07 Robert Dewar <dewar@adacore.com>
* exp_ch4.adb: Rewrite concatenation expansion.
2009-04-07 Ed Schonberg <schonberg@adacore.com>
* sem_ch8.adb (Restore_Scope_Stack): First_Private_Entity is only

File diff suppressed because it is too large Load Diff

View File

@ -5772,10 +5772,10 @@ package body Sem_Ch3 is
-- The representation clauses for T can specify a completely different
-- record layout from R's. Hence the same component can be placed in two
-- very different positions in objects of type T and R. If R and are tagged
-- types, representation clauses for T can only specify the layout of non
-- inherited components, thus components that are common in R and T have
-- the same position in objects of type R and T.
-- very different positions in objects of type T and R. If R and T are
-- tagged types, representation clauses for T can only specify the layout
-- of non inherited components, thus components that are common in R and T
-- have the same position in objects of type R and T.
-- This has two implications. The first is that the entire tree for R's
-- declaration needs to be copied for T in the untagged case, so that T
@ -6392,10 +6392,12 @@ package body Sem_Ch3 is
Type_Definition =>
Make_Derived_Type_Definition (Loc,
Abstract_Present => Abstract_Present (Type_Def),
Limited_Present => Limited_Present (Type_Def),
Subtype_Indication =>
New_Occurrence_Of (Parent_Base, Loc),
Record_Extension_Part =>
Relocate_Node (Record_Extension_Part (Type_Def))));
Relocate_Node (Record_Extension_Part (Type_Def)),
Interface_List => Interface_List (Type_Def)));
Set_Parent (New_Decl, Parent (N));
Mark_Rewrite_Insertion (New_Decl);
@ -6465,7 +6467,7 @@ package body Sem_Ch3 is
-- could still refer to the full type prior the change to the new
-- subtype and hence would not match the new base type created here.
Derive_Subprograms (Parent_Type, Derived_Type);
Derive_Subprograms (Parent_Type, Base_Type (Derived_Type));
-- For tagged types the Discriminant_Constraint of the new base itype
-- is inherited from the first subtype so that no subtype conformance