From ced8450b58d295f31cf70f31812008f8c5f497bc Mon Sep 17 00:00:00 2001 From: Ed Schonberg Date: Wed, 24 Apr 2013 13:10:01 +0000 Subject: exp_ch8.adb (Expand_N_Subprogram_Renaming_Declaration): If this is a renaming of predefined equality for an untagged record... 2013-04-24 Ed Schonberg * exp_ch8.adb (Expand_N_Subprogram_Renaming_Declaration): If this is a renaming of predefined equality for an untagged record, add generated body to the freeze actions for the subprogram, to prevent freezing issues when the record has incomplete components. * exp_ch4.adb (Expand_Composite_Equality): If the type is a type without completion, return a predefined comparison instead of just False. This may happen when building the expression for record equality, when some component has a type whose completion has not been seen yet. The operation will be analyzed an expanded after the type has been frozen, at which point all component types will have been completed, or an error reported. 2013-04-24 Ed Schonberg * sem_ch13.adb (Analyze_Aspect_Specifications): Do not delay analysis of a Convention aspect. From-SVN: r198225 --- gcc/ada/exp_ch4.adb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'gcc/ada/exp_ch4.adb') diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index 76bf939..e463f38 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -2568,11 +2568,14 @@ package body Exp_Ch4 is Full_Type := Typ; end if; - -- Defense against malformed private types with no completion the error - -- will be diagnosed later by check_completion + -- If the private type has no completion the context may be the + -- expansion of a composite equality for a composite type with some + -- still incomplete components. The expression will not be analyzed + -- until the enclosing type is completed, at which point this will be + -- properly expanded, unless there is a bona fide completion error. if No (Full_Type) then - return New_Reference_To (Standard_False, Loc); + return Make_Op_Eq (Loc, Left_Opnd => Lhs, Right_Opnd => Rhs); end if; Full_Type := Base_Type (Full_Type); -- cgit v1.1