+2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * sem_res.adb (Is_Control_Flow_Statement): Delay statements
+ contain an expression, which in turn may have side effects and
+ affect the infinite recursion. As a result, delay statements
+ should not be treated specially.
+
2019-07-05 Arnaud Charlet <charlet@adacore.com>
* libgnarl/s-linux.ads, libgnarl/s-linux__alpha.ads,
function Is_Control_Flow_Statement (N : Node_Id) return Boolean is
begin
- -- Delay statements do not affect the control flow because they
- -- simply postpone the execution of all subsequent statements.
+ -- It is assumed that all statements may affect the control flow in
+ -- some way. A raise statement may be expanded into a non-statement
+ -- node.
- if Nkind (N) in N_Delay_Statement then
- return False;
-
- -- Otherwise it is assumed that all other statements may affect the
- -- control flow in some way. A raise statement may be expanded into
- -- a non-statement node.
-
- else
- return Is_Statement (N) or else Is_Raise_Statement (N);
- end if;
+ return Is_Statement (N) or else Is_Raise_Statement (N);
end Is_Control_Flow_Statement;
--------------------------------