In lock-free protected subprograms we don't allow goto statements;
likewise, we now reject conditional goto statements.
This fix only affects semantic checking mode with switch -gnatc.
In ordinary compilation we already rejected conditional goto after
it was expanded into ordinary goto.
gcc/ada/
* sem_ch9.adb (Allows_Lock_Free_Implementation): Reject
conditional goto statements.
-- Goto statements restricted
- elsif Kind = N_Goto_Statement then
+ elsif Kind in N_Goto_Statement | N_Goto_When_Statement then
if Lock_Free_Given then
Error_Msg_N ("goto statement not allowed", N);
return Skip;