From dc3af7e24f15deaa9ea281be5f46b6f1aae1cbd4 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Mon, 6 Aug 2012 10:48:19 +0200 Subject: [multiple changes] 2012-08-06 Arnaud Charlet * prj-attr.adb (Register_New_Package): Add missing blank. 2012-08-06 Ed Schonberg * exp_aggr.adb (Is_Two_Dim_Packed_Array): New predicate, used when computing maximum size allowable to construct static aggregate. 2012-08-06 Vincent Pucci * freeze.adb (Freeze_Entity): Inherit_Aspects_At_Freeze_Point calls added for derived types and subtypes. * sem_aux.adb, sem_aux.ads (Get_Rep_Item, Get_Rep_Pragma, Has_Rep_Pragma): New routines. * sem_ch13.ads (Inherit_Aspects_At_Freeze_Point): New routine. * sem_ch13.adb (Analyze_Aspect_Specifications): Error message for aspect Lock_Free fixed. (Inherits_Aspects_At_Freeze_Point): New routine. * sem_ch3.adb: Several flag settings removed since inheritance of aspects must be performed at freeze point. 2012-08-06 Thomas Quinot * s-oscons-tmplt.c: Fix s-oscons.ads formatting on VxWorks. 2012-08-06 Vincent Pucci * sem_dim.adb (Analyze_Dimension_Binary_Op): Issue an error message for unknown exponent at compile-time. 2012-08-06 Gary Dismukes * sem_eval.ads (Compile_Time_Known_Value_Or_Aggr): Enhance comment to make it clear that the aggregate's evaluation might still involve run-time checks even though the aggregate is considered known at compile time. * sinfo.ads (Compile_Time_Known_Aggregate): Correct comment to refer to Exp_Aggr instead of Sem_Aggr. From-SVN: r190172 --- gcc/ada/freeze.adb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gcc/ada/freeze.adb') diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index 5f0547c..ad9f06a 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -3434,11 +3434,22 @@ package body Freeze is end if; end if; + -- A subtype inherits all the type-related representation aspects + -- from its parents (RM 13.1(8)). + + Inherit_Aspects_At_Freeze_Point (E); + -- For a derived type, freeze its parent type first (RM 13.14(15)) elsif Is_Derived_Type (E) then Freeze_And_Append (Etype (E), N, Result); Freeze_And_Append (First_Subtype (Etype (E)), N, Result); + + -- A derived type inherits each type-related representation aspect + -- of its parent type that was directly specified before the + -- declaration of the derived type (RM 13.1(15)). + + Inherit_Aspects_At_Freeze_Point (E); end if; -- For array type, freeze index types and component type first -- cgit v1.1