aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/freeze.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2013-10-13 18:21:32 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2013-10-13 18:21:32 +0200
commitad0d71b531e7d06b96e1b3675ba99845f43f766d (patch)
tree17541ff65910eb69bb15a9689634fda36c44df38 /gcc/ada/freeze.adb
parentcf895a0159fe915e00213fa700fbe8a1bc838b7a (diff)
downloadgcc-ad0d71b531e7d06b96e1b3675ba99845f43f766d.zip
gcc-ad0d71b531e7d06b96e1b3675ba99845f43f766d.tar.gz
gcc-ad0d71b531e7d06b96e1b3675ba99845f43f766d.tar.bz2
[multiple changes]
2013-10-13 Thomas Quinot <quinot@adacore.com> * scos.ads: Minor documentation clarification. 2013-10-13 Thomas Quinot <quinot@adacore.com> * s-oscons-tmplt.c (CLOCK_RT_Ada): Set to CLOCK_MONOTONIC when building on AIX 5.3 or later, and to CLOCK_REALTIME on older versions of AIX. * init.c (pthread_condattr_setclock): Remove now useless weak symbol. * thread.c(__gnat_pthread_condattr_setup): Remove bogus AIX 5.2 compatibility shim. * s-osinte-aix.ads(clock_id_t): Fix C mapping (this is a 64-bit type). (clock_gettime): Import from C runtime library. * s-osinte-aix.adb (clock_gettime): Remove bogus emulation body, this routine is provided by the system in current supported versions of AIX. 2013-10-13 Robert Dewar <dewar@adacore.com> * sem_ch3.adb: Minor reformatting. 2013-10-13 Ed Schonberg <schonberg@adacore.com> * freeze.adb (Freeze_Entity): For a function whose return type is incomplete, do not replace the type with the full view if the type is a limited view. In that case the full view appears in a different unit, and the back-end will retrieve it at the proper elaboration point. 2013-10-13 Yannick Moy <moy@adacore.com> * exp_spark.adb (Expand_SPARK_Call): Do not introduce temporaries for actuals. From-SVN: r203503
Diffstat (limited to 'gcc/ada/freeze.adb')
-rw-r--r--gcc/ada/freeze.adb8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb
index 67f203d..8c9ceb0 100644
--- a/gcc/ada/freeze.adb
+++ b/gcc/ada/freeze.adb
@@ -2956,6 +2956,7 @@ package body Freeze is
if Is_Incomplete_Type (F_Type)
and then Present (Full_View (F_Type))
+ and then not From_With_Type (F_Type)
then
F_Type := Full_View (F_Type);
Set_Etype (Formal, F_Type);
@@ -3134,10 +3135,15 @@ package body Freeze is
R_Type := Etype (E);
-- AI05-0151: the return type may have been incomplete
- -- at the point of declaration.
+ -- at the point of declaration. Replace it with the full
+ -- view, unless the current type is a limited view. In
+ -- that case the full view is in a different unit, and
+ -- gigi finds the non-limited view after the other unit
+ -- is elaborated.
if Ekind (R_Type) = E_Incomplete_Type
and then Present (Full_View (R_Type))
+ and then not From_With_Type (R_Type)
then
R_Type := Full_View (R_Type);
Set_Etype (E, R_Type);