The following code:
.sub _realmain
bsr FOO
call _function
end
FOO: print "In main's FOO"
ret
.end
.sub _function
bsr FOO
ret
FOO: print "in the function's FOO"
ret
.end
Causes "In main's FOO" to be printed twice. While an understandable
behavior, probably not the correct one. Language in parsing.pod indicates
that perhaps the labels should be munged by IMCC. If this *is* the
correct behavior, then a "duplicate label" error of some kind should be
emitted by IMCC.
... and not the documented one.
I did not strictly implement the documented behavior of global/local
labels until now, because some users of imcc didn't follow this
conventions, IIRC.
But anyway, its time to just break such (ab)usage, if its still existing.
So again and finally:
_global: labels get their address in fixup_bsrs()
local: labels can't be used to branch between different compilation
units.
Thanks for the bug report, fixed,
leo