]> gcc.gnu.org Git - gcc.git/commitdiff
sem_attr.adb (Analyze_Access_Attribute): Treat P'Access like a call only in the stati...
authorBob Duff <duff@adacore.com>
Fri, 12 Apr 2013 13:24:37 +0000 (13:24 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Fri, 12 Apr 2013 13:24:37 +0000 (15:24 +0200)
2013-04-12  Bob Duff  <duff@adacore.com>

* sem_attr.adb (Analyze_Access_Attribute): Treat P'Access like a
call only in the static elaboration model.

From-SVN: r197913

gcc/ada/ChangeLog
gcc/ada/sem_attr.adb

index cf86c6f8ccb93afe8adfa18160c06bce0a3502aa..9c04df5c2932b5b8e4a83db72f7edadc94b41b08 100644 (file)
@@ -1,3 +1,8 @@
+2013-04-12  Bob Duff  <duff@adacore.com>
+
+       * sem_attr.adb (Analyze_Access_Attribute): Treat P'Access like a
+       call only in the static elaboration model.
+
 2013-04-12  Hristian Kirtchev  <kirtchev@adacore.com>
 
        * sem_prag.adb (Analyze_Input_List): Detect an illegal dependency
index 4b3c46c4f1d5c42e6d295896ea7d8060a54db859..770be4e811f4e002853b2e54d88a3e3565c95838 100644 (file)
@@ -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;
 
This page took 0.078779 seconds and 5 git commands to generate.