I have a test routine containing a ZGOTO command that
refers to another line in the same routine. When I
ZLINK the routine I get the following error:
GTM>zlink "YJM2"
%GTM-E-MEMORY, Central memory exhausted during request
for 1493184054 bytes
%SYSTEM-E-ENO12, Cannot allocate memory
GTM>
YJM2 ; ZGOTO bug during ZLINK
;
; This works
ZGOTO $ZL:tag
;
; This doesn't. If I comment it out
; the routine will ZLINK
ZGOTO $ZL:tag^YJM2
;
tag ;
Q
==
My guess is, when ZLINK finds the second ZGOTO and
discovers the target routine (YJM2) needs linking, it
goes off to do this, discovers that contains a ZGOTO
with a target (YJM2) that needs linking, etc...
Logged In: YES
user_id=8257
What version are you using? I get somewhat different (but no more useful) results (INVOBJ error):
bug> zlink "foo"
%GTM-E-INVOBJ, Cannot ZLINK object file due to unexpected format
bug> zp ^foo
%GTM-E-INVOBJ, Cannot ZLINK object file due to unexpected format
bug> w $zv
GT.M V4.2-001 Linux x86
bug> h
$ cat foo.m
foo ;
;
zgoto $zl:tag^foo
;
tag ;
q
$
Logged In: YES
user_id=210966
This is a bug in GTM. We need to do further investigation
into the problem and is in our to do list of items. Since
the work around is available ( using a different file name),
this will be taken up at a lower priority. We are sorry for
the inconvenience caused . We will have update on this as
soon as we resolve it.
Thanks,
Prasad.
Logged In: YES
user_id=210966
One additoinal comment to my previous mail after talking to
others in the group. To be more specific on the workaround
using a different file name in the above example, we can use
the tag code in a different file (YJM3) instead the same
file (YJM2).
Thanks,
Prasad.