gv:gv_try_downgrade: Leave PL_last_in_gv alone
gv_try_downgrade exists to remove globs and subs that were (possibly
temporarily) vivified by bareword lookup. It is called whenever a
gvop is freed and its gv looks like a candidate for downgrading. That
means it applies, not only to potential sub calls, but also to *foo
and *bar. gv_try_downgrade may delete a glob from the stash alto-
gether if it is empty. So eval "*foo if 0" may delete the *foo glob.
PL_last_in_gv is the internal variable underlying ${^LAST_FH}. If
gv_try_downgrade deletes the last-read handle, then ${^LAST_FH}
will become undefined, whereas eval "*foo if 0" is not supposed to
do anything:
$ ./miniperl -le 'readline *{"foo"}; warn ${^LAST_FH}; eval "*foo if 0"; warn ${^LAST_FH}'
GLOB(0x7f8f5a0052a0) at -e line 1.
Warning: something's wrong at -e line 1.