The target of a requeue statement on a protected entry must be a variable. This
is part of AI05-0225, a binding interpretation that applies to all versions of
the language.
See ACATS test b954005.adb.
Tested on x86_64-pc-linux-gnu, committed on trunk
2012-10-01 Ed Schonberg <[email protected]>
* sem_ch9.adb (Analyze_Requeue): The target of a requeue
statement on a protected entry must be a variable. This is part
of AI05-0225.
Index: sem_ch9.adb
===================================================================
--- sem_ch9.adb (revision 191888)
+++ sem_ch9.adb (working copy)
@@ -2379,6 +2379,18 @@
end;
end if;
end if;
+
+ -- AI05-0225: the target protected object of a requeue must be a
+ -- variable. This is a binding interpretation that applies to all
+ -- versions of the language.
+
+ if Present (Target_Obj)
+ and then Ekind (Scope (Entry_Id)) in Protected_Kind
+ and then not Is_Variable (Target_Obj)
+ then
+ Error_Msg_N
+ ("target protected object of requeue must be a variable", N);
+ end if;
end Analyze_Requeue;
------------------------------