summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch4.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2015-05-26 13:37:29 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2015-05-26 13:37:29 +0000
commite9e5d08c477f2e602b0a484c36665be42d1760eb (patch)
treea0ef882e5129e5a8a53a1340365a9896fa87e4c4 /gcc/ada/sem_ch4.adb
parent038ce8c6f65ef3a1f6cfd75f1713cdea0d1d19c6 (diff)
downloadgcc-e9e5d08c477f2e602b0a484c36665be42d1760eb.tar.gz
2015-05-26 Ed Schonberg <schonberg@adacore.com>
* sinfo.ads: Minor reformatting. * sem_aux.ads: Clarify use of First_Discriminant. * sem_ch4.adb (Analyze_Explicit_Dereference): The use of a limited view is replaced with the non-limited view in an instance body, where the enclosing unit must have a regular with_clause on the relevant unit. * sem_ch12.adb (Install_Body): Freeze instantation after its body. Remove useless freeze nodes for incomplete actuals to prevent multiple generation of internal operations. (Instantiate_Package_Body): Set sloc of body appropriately when there are incomplete actuals and the instance body is placed in the body of the enclosing unit. * errout.ads: Consistent punctuation, better alignment and trivial typos in comments. * err_vars.ads: Fix typo. 2015-05-26 Eric Botcazou <ebotcazou@adacore.com> * sem_ch8.adb (Analyze_Object_Renaming): Lift restriction on components of Volatile_Full_Access objects. 2015-05-26 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Is_Non_Overriding_Operation, Get_Generic_Parent_Type): Handle properly the case of a derived scalar type by using the first subtype rather than its generated anonymous base type. 2015-05-26 Eric Botcazou <ebotcazou@adacore.com> * einfo.adb (Write_Field17_Name): Move E_Incomplete_Subtype case to... (Write_Field19_Name): ...here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223696 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch4.adb')
-rw-r--r--gcc/ada/sem_ch4.adb7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb
index 3063b6427fa..1c0dbd9b723 100644
--- a/gcc/ada/sem_ch4.adb
+++ b/gcc/ada/sem_ch4.adb
@@ -1969,7 +1969,9 @@ package body Sem_Ch4 is
-- An explicit dereference is a legal occurrence of an
-- incomplete type imported through a limited_with clause,
- -- if the full view is visible.
+ -- if the full view is visible, or if we are within an
+ -- instance body, where the enclosing body has a regular
+ -- with_clause on the unit.
if From_Limited_With (DT)
and then not From_Limited_With (Scope (DT))
@@ -1977,7 +1979,8 @@ package body Sem_Ch4 is
(Is_Immediately_Visible (Scope (DT))
or else
(Is_Child_Unit (Scope (DT))
- and then Is_Visible_Lib_Unit (Scope (DT))))
+ and then Is_Visible_Lib_Unit (Scope (DT)))
+ or else In_Instance_Body)
then
Set_Etype (N, Available_View (DT));