From ad0d71b531e7d06b96e1b3675ba99845f43f766d Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Sun, 13 Oct 2013 18:21:32 +0200 Subject: [multiple changes] 2013-10-13 Thomas Quinot * scos.ads: Minor documentation clarification. 2013-10-13 Thomas Quinot * 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 * sem_ch3.adb: Minor reformatting. 2013-10-13 Ed Schonberg * 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 * exp_spark.adb (Expand_SPARK_Call): Do not introduce temporaries for actuals. From-SVN: r203503 --- gcc/ada/freeze.adb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gcc/ada/freeze.adb') 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); -- cgit v1.1