===================================================================
@@ -476,8 +476,8 @@
-- subprogram specifications and bodies the field holds the correponding
-- program unit name. For task declarations and bodies, protected types
-- and bodies, and accept statements the field hold the name of the type
- -- or operation. For if-statements, case-statements, and selects, the
- -- field is initialized to Error.
+ -- or operation. For if-statements, case-statements, return statements,
+ -- and selects, the field is initialized to Error.
-- Note: this is a bit of an odd (mis)use of Error, since there is no
-- Error, but we use this value as a place holder to indicate that it
===================================================================
@@ -1909,8 +1909,9 @@
if Token = Tok_Do then
Push_Scope_Stack;
+ Scope.Table (Scope.Last).Ecol := Ret_Strt;
Scope.Table (Scope.Last).Etyp := E_Return;
- Scope.Table (Scope.Last).Ecol := Ret_Strt;
+ Scope.Table (Scope.Last).Labl := Error;
Scope.Table (Scope.Last).Sloc := Ret_Sloc;
Scan; -- past DO