* lisp/emacs-lisp/comp.el (comp-spill-lap-function): Fix
temporary eln name generation.
* test/src/comp-tests.el (free-fun-silly-name): New testcase.
"Byte-compile FUNCTION-NAME spilling data from the byte compiler."
(unless (comp-ctxt-output comp-ctxt)
(setf (comp-ctxt-output comp-ctxt)
- (make-temp-file (symbol-name function-name) nil ".eln")))
+ (make-temp-file (comp-c-func-name function-name "freefn-")
+ nil ".eln")))
(let* ((f (symbol-function function-name))
(c-name (comp-c-func-name function-name "F"))
(func (make-comp-func-l :name function-name
(should (equal (interactive-form #'comp-tests-free-fun-f)
'(interactive))))
+(comp-deftest free-fun-silly-name ()
+ "Check we are able to compile a single function."
+ (eval '(defun comp-tests/free\fun-f ()) t)
+ (native-compile #'comp-tests/free\fun-f)
+ (should (subr-native-elisp-p (symbol-function #'comp-tests/free\fun-f))))
+
(comp-deftest bug-40187 ()
"Check function name shadowing.
https://lists.gnu.org/archive/html/bug-gnu-emacs/2020-03/msg00914.html."