aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch8.adb
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2013-04-24 13:10:01 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2013-04-24 15:10:01 +0200
commitced8450b58d295f31cf70f31812008f8c5f497bc (patch)
treeb10ddf1a257c099dc0375312a80da34c256edd9c /gcc/ada/exp_ch8.adb
parentb546e2a732f0572fb3119facb48ead0b44c75afc (diff)
downloadgcc-ced8450b58d295f31cf70f31812008f8c5f497bc.zip
gcc-ced8450b58d295f31cf70f31812008f8c5f497bc.tar.gz
gcc-ced8450b58d295f31cf70f31812008f8c5f497bc.tar.bz2
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 <schonberg@adacore.com> * 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 <schonberg@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specifications): Do not delay analysis of a Convention aspect. From-SVN: r198225
Diffstat (limited to 'gcc/ada/exp_ch8.adb')
-rw-r--r--gcc/ada/exp_ch8.adb8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/ada/exp_ch8.adb b/gcc/ada/exp_ch8.adb
index 3b5c7d3..97bfac4 100644
--- a/gcc/ada/exp_ch8.adb
+++ b/gcc/ada/exp_ch8.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2012, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -328,8 +328,8 @@ package body Exp_Ch8 is
-- meaning. It may be redefined later, but the renaming is
-- elaborated where it occurs. This is technically known as
-- Squirreling semantics. Renaming is rewritten as a subprogram
- -- declaration, and the body is inserted at the end of the
- -- current declaration list to prevent premature freezing.
+ -- declaration, and the generated body is inserted into the
+ -- freeze actions for the subprogram.
Decl := Build_Body_For_Renaming;
@@ -345,7 +345,7 @@ package body Exp_Ch8 is
Rhs => Make_Identifier (Loc, Chars (Right)),
Bodies => Declarations (Decl))))));
- Append (Decl, List_Containing (N));
+ Append_Freeze_Action (Id, Decl);
end if;
end;
end if;