From 13fa2acbf0fe378a034920f214b727005fe4d0ef Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Thu, 23 Oct 2014 12:27:00 +0200 Subject: [multiple changes] 2014-10-23 Vincent Celier * gnatls.adb: If --RTS= was not used, check if there is a default runtime. If there is none, in verbose mode, indicate that the default runtime is not available and show only the current directory in the source and the object search paths. 2014-10-23 Ed Schonberg * sem_ch6.adb (Process_Formals): A thunk procedure with a parameter of a limited view does not need a freeze node. 2014-10-23 Hristian Kirtchev * sem_ch7.adb (Analyze_Package_Body_Helper): The logic which hides local entities from external visibility is now contained in routine Hide_Public_Entities. (Hide_Public_Entities): New routine. Object and subprogram renamings are now hidden from external visibility the same way objects are. 2014-10-23 Ed Schonberg * sem_attr.adb (Analyze_Attribute): The prefix of attribute Elaborated does not require freezing, in particular if it denotes a generic function. From-SVN: r216585 --- gcc/ada/sem_attr.adb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'gcc/ada/sem_attr.adb') diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 10220ee..071399b 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -11164,7 +11164,16 @@ package body Sem_Attr is -- Normally the Freezing is done by Resolve but sometimes the Prefix -- is not resolved, in which case the freezing must be done now. - Freeze_Expression (P); + -- For an elaboration check on a subprogram, we do not freeze its type. + -- It may be declared in an unrelated scope, in particular in the case + -- of a generic function whose type may remain unelaborated. + + if Attr_Id = Attribute_Elaborated then + null; + + else + Freeze_Expression (P); + end if; -- Finally perform static evaluation on the attribute reference -- cgit v1.1