From 97b9064f51cab2ae12cabc9fb9d90b8477f2fd22 Mon Sep 17 00:00:00 2001 From: Bob Duff Date: Fri, 12 Apr 2013 13:24:37 +0000 Subject: [PATCH] sem_attr.adb (Analyze_Access_Attribute): Treat P'Access like a call only in the static elaboration model. 2013-04-12 Bob Duff * sem_attr.adb (Analyze_Access_Attribute): Treat P'Access like a call only in the static elaboration model. From-SVN: r197913 --- gcc/ada/ChangeLog | 5 +++++ gcc/ada/sem_attr.adb | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index cf86c6f..9c04df5 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2013-04-12 Bob Duff + + * sem_attr.adb (Analyze_Access_Attribute): Treat P'Access like a + call only in the static elaboration model. + 2013-04-12 Hristian Kirtchev * sem_prag.adb (Analyze_Input_List): Detect an illegal dependency diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 4b3c46c..770be4e 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -175,7 +175,7 @@ package body Sem_Attr is -- Note that the only required action of this procedure is to catch the -- static expression cases as described in the RM. Folding of other cases -- is done where convenient, but some additional non-static folding is in - -- N_Expand_Attribute_Reference in cases where this is more convenient. + -- Expand_N_Attribute_Reference in cases where this is more convenient. function Is_Anonymous_Tagged_Base (Anon : Entity_Id; @@ -654,10 +654,11 @@ package body Sem_Attr is Kill_Current_Values; end if; - -- Treat as call for elaboration purposes and we are all done. - -- Suppress this treatment under debug flag. + -- In the static elaboration model, treat the attribute reference + -- as a call for elaboration purposes. Suppress this treatment + -- under debug flag. In any case, we are all done. - if not Debug_Flag_Dot_UU then + if not Dynamic_Elaboration_Checks and not Debug_Flag_Dot_UU then Check_Elab_Call (N); end if; -- 2.7.4