In Alfa mode, protected subprogram calls are not expanded, so that unresolved
calls must be allowed in a place where they should not be allowed in normal
mode.
Tested on x86_64-pc-linux-gnu, committed on trunk

2011-09-02  Yannick Moy  <m...@adacore.com>

        * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
        unresolved calls.

Index: exp_ch6.adb
===================================================================
--- exp_ch6.adb (revision 178412)
+++ exp_ch6.adb (working copy)
@@ -6084,7 +6084,7 @@
 
          Build_Protected_Subprogram_Call (N,
            Name     => New_Occurrence_Of (Subp, Sloc (N)),
-           Rec      =>  Convert_Concurrent (Rec, Etype (Rec)),
+           Rec      => Convert_Concurrent (Rec, Etype (Rec)),
            External => True);
 
       else
@@ -6797,6 +6797,16 @@
 
          elsif Nkind (Name (Exp_Node)) = N_Explicit_Dereference then
             Function_Id := Etype (Name (Exp_Node));
+
+         --  In Alfa mode, protected subprogram calls are not expanded, so that
+         --  we may end up with a call that is neither resolved to an entity,
+         --  nor an indirect call.
+
+         elsif Alfa_Mode then
+            return False;
+
+         else
+            raise Program_Error;
          end if;
 
          return Is_Build_In_Place_Function (Function_Id);

Reply via email to