From ebb6faaafae68ade1685169e3f23a6870ed63102 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Tue, 6 Sep 2011 15:07:09 +0200 Subject: [multiple changes] 2011-09-06 Jerome Guitton * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK on vThreads. 2011-09-06 Thomas Quinot * s-solita.adb: Minor reformatting. 2011-09-06 Ed Schonberg * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that is a rewriting of an expression function does not freeze previous entities. 2011-09-06 Robert Dewar * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case From-SVN: r178593 --- gcc/ada/sem_ch6.adb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'gcc/ada/sem_ch6.adb') diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index d82cd72..10de099 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -2346,7 +2346,12 @@ package body Sem_Ch6 is -- expansion has generated an equivalent type that is used when -- elaborating the body. - if No (Spec_Id) then + -- An exception in the case of Ada2012, AI05-177: The bodies + -- created for expression functions do not freeze. + + if No (Spec_Id) + and then Nkind (Original_Node (N)) /= N_Expression_Function + then Freeze_Before (N, Body_Id); elsif Nkind (Parent (N)) = N_Compilation_Unit then -- cgit v1.1