On Wed, Mar 3, 2021 at 11:34 PM Andy Moreton wrote: > On Wed 03 Mar 2021, Pip Cet wrote: > > On Wed, Mar 3, 2021 at 9:15 PM Pip Cet wrote: > >> > >> Recipe in emacs -Q: > >> > >> In *scratch*, evaluate: > >> > >> (byte-compile (lambda (x) > >> (if x (f)) > >> (while t))) > >> > >> Expected result: > >> > >> A (fairly useless) bytecode object > >> > >> Actual result: > >> > >> A spinning hourglass. > > > > Seems to be a fairly obvious bug in byte-opt.el, patch attached. > > Perhaps add your reproducer as a test case ? Absolutely, thanks for the suggestion. See attached patch. Should there, maybe, be a tag for tests that are known to loop forever when they fail? It feels weird to write a test without a single should in it... Pip