aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/einfo.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-08-01 15:47:34 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2014-08-01 15:47:34 +0200
commitbf0b0e5ee1c756b593f8e8d0456504575ac63218 (patch)
treee8a236c8e7a4c783a814ba81952ae78a2118a9b8 /gcc/ada/einfo.adb
parent1eb5852081801218c02c934db5aa9852fc284645 (diff)
downloadgcc-bf0b0e5ee1c756b593f8e8d0456504575ac63218.zip
gcc-bf0b0e5ee1c756b593f8e8d0456504575ac63218.tar.gz
gcc-bf0b0e5ee1c756b593f8e8d0456504575ac63218.tar.bz2
[multiple changes]
2014-08-01 Hristian Kirtchev <kirtchev@adacore.com> * sem_attr.adb (Analyze_Attribute): Preanalyze and resolve the prefix of attribute Loop_Entry. * sem_prag.adb (Analyze_Pragma): Verify the placement of pragma Loop_Variant with respect to an enclosing loop (if any). (Contains_Loop_Entry): Update the parameter profile and all calls to this routine. * sem_res.adb (Resolve_Call): Code reformatting. Do not ask for the corresponding body before determining the nature of the ultimate alias's declarative node. 2014-08-01 Robert Dewar <dewar@adacore.com> * gnat1drv.adb, sem_ch4.adb: Minor reformatting. 2014-08-01 Robert Dewar <dewar@adacore.com> * sem_eval.adb (Rewrite_In_Raise_CE): Don't try to reuse inner constraint error node since it is a list member. 2014-08-01 Robert Dewar <dewar@adacore.com> * sem_warn.adb: Minor reformatting. 2014-08-01 Eric Botcazou <ebotcazou@adacore.com> * einfo.adb (Underlying_Type): Return the underlying full view of a private type if present. * freeze.adb (Freeze_Entity): Build a single freeze node for partial, full and underlying full views, if any. * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Private_Type>: Add a missing guard before the access to the Underlying_Full_View. * gcc-interface/trans.c (process_freeze_entity): Deal with underlying full view if present. * gcc-interface/utils.c (make_dummy_type): Avoid superfluous work. From-SVN: r213463
Diffstat (limited to 'gcc/ada/einfo.adb')
-rw-r--r--gcc/ada/einfo.adb10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ada/einfo.adb b/gcc/ada/einfo.adb
index 84e7763..6afc37c 100644
--- a/gcc/ada/einfo.adb
+++ b/gcc/ada/einfo.adb
@@ -8118,7 +8118,7 @@ package body Einfo is
elsif Ekind (Id) in Incomplete_Or_Private_Kind then
-- If we have an incomplete or private type with a full view,
- -- then we return the Underlying_Type of this full view
+ -- then we return the Underlying_Type of this full view.
if Present (Full_View (Id)) then
if Id = Full_View (Id) then
@@ -8131,6 +8131,14 @@ package body Einfo is
return Underlying_Type (Full_View (Id));
end if;
+ -- If we have a private type with an underlying full view, then we
+ -- return the Underlying_Type of this underlying full view.
+
+ elsif Ekind (Id) in Private_Kind
+ and then Present (Underlying_Full_View (Id))
+ then
+ return Underlying_Type (Underlying_Full_View (Id));
+
-- If we have an incomplete entity that comes from the limited
-- view then we return the Underlying_Type of its non-limited
-- view.