From 6fb4cddeee68c3284e62389aadc9e505092c11a9 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Mon, 20 Jul 2009 15:06:01 +0200 Subject: [multiple changes] 2009-07-20 Robert Dewar * vms_data.ads: Minor reformatting * einfo.ads, einfo.adb (Parent_Subtype): Now allowed on record subtype, applies to base type. (Parent_Subtype): Now allowed on record subtype, applies to base type * exp_ch5.adb (Expand_Assign_Record): Handle Componentwise_Assignment for case of fully repped tagged type. (Make_Tag_Ctrl_Assignment): Set Componentwise_Assignment and avoid tag save/restore for fully repped tagged type case. * exp_util.ads, exp_util.adb (Is_Fully_Repped_Tagged_Type): New function * fe.h (Is_Fully_Repped_Tagged_Type): New function * sem_ch13.adb (Analyze_Recorrd_Representation_Clause): Check for overlap of tagged type components with parent type if parent type is fully repped. * sinfo.ads, sinfo.adb (Componentwise_Assignment): New flag * sem_res.adb (Check_No_Direct_Boolean_Operators): Remove handling of comparisons. (Resolve_Comparison_Operators): Remove No_Direct_Boolean_Operators check (Resolve_Equality_Op): Remove No_Direct_Boolean_Operators check * gnat_rm.texi: Restriction No_Direct_Boolean_Operators includes only logical operators (AND/OR/XOR), not comparison operators. * sprint.ads: Minor reformatting 2009-07-20 Ed Schonberg * sem_intr.adb (Check_Intrinsic_Call): For Import_Value and related intrinsics, check that argument is a string literal, rather than checking for staticness. From-SVN: r149811 --- gcc/ada/exp_util.ads | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gcc/ada/exp_util.ads') diff --git a/gcc/ada/exp_util.ads b/gcc/ada/exp_util.ads index c310a21..1f3c9e8 100644 --- a/gcc/ada/exp_util.ads +++ b/gcc/ada/exp_util.ads @@ -466,6 +466,15 @@ package Exp_Util is -- False otherwise. True for an empty list. It is an error to call this -- routine with No_List as the argument. + function Is_Fully_Repped_Tagged_Type (T : Entity_Id) return Boolean; + -- Tests given type T, and returns True if T is a non-discriminated tagged + -- type which has a record representation clause that specifies the layout + -- of all the components, including recursively components in all parent + -- types. We exclude discriminated types for convenience, it is extremely + -- unlikely that the special processing associated with the use of this + -- routine is useful for the case of a discriminated type, and testing for + -- component overlap would be a pain. + function Is_Library_Level_Tagged_Type (Typ : Entity_Id) return Boolean; -- Return True if Typ is a library level tagged type. Currently we use -- this information to build statically allocated dispatch tables. -- cgit v1.1