aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch6.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-02-24 17:51:58 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2014-02-24 17:51:58 +0100
commitc6d2191a0da9f40899da20933f008242f90262e0 (patch)
tree3a271858d673fb57c047135e5a838d33e1ee5af4 /gcc/ada/sem_ch6.adb
parentec77b14454cfb80c70a0b17b7ced31c8956af30b (diff)
downloadgcc-c6d2191a0da9f40899da20933f008242f90262e0.zip
gcc-c6d2191a0da9f40899da20933f008242f90262e0.tar.gz
gcc-c6d2191a0da9f40899da20933f008242f90262e0.tar.bz2
[multiple changes]
2014-02-24 Hristian Kirtchev <kirtchev@adacore.com> * sem_prag.adb (Analyze_Global_Item): Emit the variable related checks concerning volatile objects only when SPARK_Mode is on. 2014-02-24 Robert Dewar <dewar@adacore.com> * sem_ch5.adb (Analyze_Iterator_Specification): use Error_Msg_Ada_2012_Feature. 2014-02-24 Jose Ruiz <ruiz@adacore.com> * s-rident.ads (Profile_Info): For Ravenscar, the restrictions No_Local_Timing_Events and No_Specific_Termination_Handlers must be set, according to the Ravenscar profile definition in D.13(6/3). 2014-02-24 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Analyze_Expression_Function): If this is a completion, freeze return type and its designated type if needed. 2014-02-24 Thomas Quinot <quinot@adacore.com> * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case 'Address): When moving initialization statements to a freeze entity, keep them under a single node (i.e. do not unwrap expressions with actions), and set the Initialization_Statements attribute again so that processing of a later pragma Import can still remove them. 2014-02-24 Claire Dross <dross@adacore.com> * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads, a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads, a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename Left/Right to First_To_Previous/Current_To_Last. 2014-02-24 Thomas Quinot <quinot@adacore.com> * adaint.h (struct file_attributes): New component "error" (__gnat_error_attributes): Accessor for the above. * adaint.c (__gnat_error_attributes): New subprogram (__gnat_stat): Fix returned value (expect errno value) (__gnat_stat_to_attr): Add management of error component (set to stat errno value, except for missing files where it is set to 0, and exists is set to 0). * osint.ads (File_Attributes_Size): Update per change above, also clarify documentation. * s-filatt.ads: New file, binding to file attributes related functions. * Makefile.rtl (s-filatt): New runtime unit. * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back to library function if not available on target). * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram. * s-oscons-tmplt.c (SIZEOF_struct_file_attributes, SIZEOF_struct_dirent_alloc): New constants. * Make-generated.in (s-oscons.ads): Now requires adaint.h. * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes. Perform appropriate error checking if stat fails (do not just ignore existing files if stat fails) * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update dependencies. From-SVN: r208078
Diffstat (limited to 'gcc/ada/sem_ch6.adb')
-rw-r--r--gcc/ada/sem_ch6.adb12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index 5885e3f..cc6795b 100644
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -369,6 +369,18 @@ package body Sem_Ch6 is
elsif Present (Prev) and then Comes_From_Source (Prev) then
Set_Has_Completion (Prev, False);
+ -- An expression function that is a completion freezes the
+ -- expression. This means freezing the return type, and if it is
+ -- an access type, freezing its designated type as well.
+ -- Note that we cannot defer this freezing to the analysis of the
+ -- expression itself, because a freeze node might appear in a
+ -- nested scope, leading to an elaboration order issue in gigi.
+
+ Freeze_Before (N, Etype (Prev));
+ if Is_Access_Type (Etype (Prev)) then
+ Freeze_Before (N, Designated_Type (Etype (Prev)));
+ end if;
+
-- For navigation purposes, indicate that the function is a body
Generate_Reference (Prev, Defining_Entity (N), 'b', Force => True);