diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-05 09:24:44 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-05 09:24:44 +0000 |
commit | 55c4b664c2b65a2a346b55beec474e0404634c18 (patch) | |
tree | 3b804fec819d027d915850ec88821f23ed5538ea /gcc/ada/freeze.adb | |
parent | 3af4a6046ed483eb5301a47290e40328d40f954c (diff) | |
download | gcc-55c4b664c2b65a2a346b55beec474e0404634c18.tar.gz |
2011-12-05 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 182001 using svnmerge
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@182003 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/freeze.adb')
-rw-r--r-- | gcc/ada/freeze.adb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index 16521f9f6d7..3e31e9a50bc 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -1356,6 +1356,14 @@ package body Freeze is Bod : constant Node_Id := Next (After); begin + -- The presence of a body freezes all entities previously + -- declared in the current list of declarations, but this + -- does not apply if the body does not come from source. + -- A type invariant is transformed into a subprogram body + -- which is placed at the end of the private part of the + -- current package, but this body does not freeze incomplete + -- types that may be declared in this private part. + if (Nkind_In (Bod, N_Subprogram_Body, N_Entry_Body, N_Package_Body, @@ -1363,7 +1371,7 @@ package body Freeze is N_Task_Body) or else Nkind (Bod) in N_Body_Stub) and then - List_Containing (After) = List_Containing (Parent (E)) + List_Containing (After) = List_Containing (Parent (E)) and then Comes_From_Source (Bod) then Error_Msg_Sloc := Sloc (Next (After)); |