From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#51104: comp-tests.elc messes up after reconfiguring for different machine Date: Mon, 12 Sep 2022 17:05:20 -0400 Message-ID: References: <87h71c972r.fsf@gnus.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33107"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 51104@debbugs.gnu.org, Lars Ingebrigtsen , Paul Eggert , Andrea Corallo To: Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 12 23:06:50 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oXqdm-0008Sl-0u for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 12 Sep 2022 23:06:50 +0200 Original-Received: from localhost ([::1]:36628 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oXqdk-00060X-O8 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 12 Sep 2022 17:06:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37410) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXqd0-0005Gp-Kp for bug-gnu-emacs@gnu.org; Mon, 12 Sep 2022 17:06:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59480) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oXqd0-0006ee-BF for bug-gnu-emacs@gnu.org; Mon, 12 Sep 2022 17:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oXqcz-00036r-RV for bug-gnu-emacs@gnu.org; Mon, 12 Sep 2022 17:06:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Sep 2022 21:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51104 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 51104-submit@debbugs.gnu.org id=B51104.166301673611911 (code B ref 51104); Mon, 12 Sep 2022 21:06:01 +0000 Original-Received: (at 51104) by debbugs.gnu.org; 12 Sep 2022 21:05:36 +0000 Original-Received: from localhost ([127.0.0.1]:48179 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXqcY-000362-Qs for submit@debbugs.gnu.org; Mon, 12 Sep 2022 17:05:36 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:25075) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXqcU-00035c-TW for 51104@debbugs.gnu.org; Mon, 12 Sep 2022 17:05:33 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 0B15B804AB; Mon, 12 Sep 2022 17:05:25 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 1FAFF800AE; Mon, 12 Sep 2022 17:05:22 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1663016722; bh=MdDVDkRaAwesDF5msJtKuZb4xSU8rp6Nv6SHlGpy+Nk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Hm0GDGV2MCcdBg2sezmuSQ+avkl34PTWR0232Mw+hm4gMqT515r9y69dLy+bO+fix st0soP3lwzKgnyfEdJrW2K//KD/QvxTtRhgXSw0NWCgN+pprdD4IGzkOByU8EuMmUb Qj6s2f6dTTuEApuR4BZQ73blN6u/SCeBt7QG8uaYBnWG86DjE1ngidQaMBkM7pbVBo 5Rqw9diF5YnPkNUxgRAZ8bqC7ZiVaK0miKOriuGprFdFxTEwG2QVThjbWuF2fMVy0W UwrJq7NuVcn2GBqLSl6LVSdO9VzfwZ5y0sB7nUTm6aILc8WZMFUvy9sS2s06sTFQ9I odbjYJ/hGh9Og== Original-Received: from pastel (unknown [157.52.9.190]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id D88CF12022E; Mon, 12 Sep 2022 17:05:21 -0400 (EDT) In-Reply-To: (Andrea Corallo's message of "Mon, 12 Sep 2022 15:30:16 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:242304 Archived-At: >> Andrea, do you see any way to fix this test for this 32-bit/64-bit >> scenarion? Not Andrea, but IIUC the patch below might do the trick. Can someone confirm? Stefan diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el index a5f33069e01..a400a1a50a1 100644 --- a/test/src/comp-tests.el +++ b/test/src/comp-tests.el @@ -860,21 +860,21 @@ comp-tests-check-ret-type-spec (cl-eval-when (compile eval load) (defconst comp-tests-type-spec-tests - `( + '( ;; 1 ((defun comp-tests-ret-type-spec-f (x) x) - t) + 't) ;; 2 ((defun comp-tests-ret-type-spec-f () 1) - (integer 1 1)) + '(integer 1 1)) ;; 3 ((defun comp-tests-ret-type-spec-f (x) (if x 1 3)) - (or (integer 1 1) (integer 3 3))) + '(or (integer 1 1) (integer 3 3))) ;; 4 ((defun comp-tests-ret-type-spec-f (x) @@ -883,7 +883,7 @@ comp-tests-check-ret-type-spec (setf y 1) (setf y 2)) y)) - (integer 1 2)) + '(integer 1 2)) ;; 5 ((defun comp-tests-ret-type-spec-f (x) @@ -892,73 +892,73 @@ comp-tests-check-ret-type-spec (setf y 1) (setf y 3)) y)) - (or (integer 1 1) (integer 3 3))) + '(or (integer 1 1) (integer 3 3))) ;; 6 ((defun comp-tests-ret-type-spec-f (x) (if x (list x) 3)) - (or cons (integer 3 3))) + '(or cons (integer 3 3))) ;; 7 ((defun comp-tests-ret-type-spec-f (x) (if x 'foo 3)) - (or (member foo) (integer 3 3))) + '(or (member foo) (integer 3 3))) ;; 8 ((defun comp-tests-ret-type-spec-f (x) (if (eq x 3) x 'foo)) - (or (member foo) (integer 3 3))) + '(or (member foo) (integer 3 3))) ;; 9 ((defun comp-tests-ret-type-spec-f (x) (if (eq 3 x) x 'foo)) - (or (member foo) (integer 3 3))) + '(or (member foo) (integer 3 3))) ;; 10 ((defun comp-tests-ret-type-spec-f (x) (if (eql x 3) x 'foo)) - (or (member foo) (integer 3 3))) + '(or (member foo) (integer 3 3))) ;; 11 ((defun comp-tests-ret-type-spec-f (x) (if (eql 3 x) x 'foo)) - (or (member foo) (integer 3 3))) + '(or (member foo) (integer 3 3))) ;; 12 ((defun comp-tests-ret-type-spec-f (x) (if (eql x 3) 'foo x)) - (not (integer 3 3))) + '(not (integer 3 3))) ;; 13 ((defun comp-tests-ret-type-spec-f (x y) (if (= x y) x 'foo)) - (or (member foo) marker number)) + '(or (member foo) marker number)) ;; 14 ((defun comp-tests-ret-type-spec-f (x) (comp-hint-fixnum x)) - (integer ,most-negative-fixnum ,most-positive-fixnum)) + `(integer ,most-negative-fixnum ,most-positive-fixnum)) ;; 15 ((defun comp-tests-ret-type-spec-f (x) (comp-hint-cons x)) - cons) + 'cons) ;; 16 ((defun comp-tests-ret-type-spec-f (x) @@ -966,7 +966,7 @@ comp-tests-check-ret-type-spec (when x (setf y 4)) y)) - (or null (integer 4 4))) + '(or null (integer 4 4))) ;; 17 ((defun comp-tests-ret-type-spec-f () @@ -974,7 +974,7 @@ comp-tests-check-ret-type-spec (y 3)) (setf x y) y)) - (integer 3 3)) + '(integer 3 3)) ;; 18 ((defun comp-tests-ret-type-spec-f (x) @@ -982,120 +982,120 @@ comp-tests-check-ret-type-spec (when x (setf y x)) y)) - t) + 't) ;; 19 ((defun comp-tests-ret-type-spec-f (x y) (eq x y)) - boolean) + 'boolean) ;; 20 ((defun comp-tests-ret-type-spec-f (x) (when x 'foo)) - (or (member foo) null)) + '(or (member foo) null)) ;; 21 ((defun comp-tests-ret-type-spec-f (x) (unless x 'foo)) - (or (member foo) null)) + '(or (member foo) null)) ;; 22 ((defun comp-tests-ret-type-spec-f (x) (when (> x 3) x)) - (or null float (integer 4 *))) + '(or null float (integer 4 *))) ;; 23 ((defun comp-tests-ret-type-spec-f (x) (when (>= x 3) x)) - (or null float (integer 3 *))) + '(or null float (integer 3 *))) ;; 24 ((defun comp-tests-ret-type-spec-f (x) (when (< x 3) x)) - (or null float (integer * 2))) + '(or null float (integer * 2))) ;; 25 ((defun comp-tests-ret-type-spec-f (x) (when (<= x 3) x)) - (or null float (integer * 3))) + '(or null float (integer * 3))) ;; 26 ((defun comp-tests-ret-type-spec-f (x) (when (> 3 x) x)) - (or null float (integer * 2))) + '(or null float (integer * 2))) ;; 27 ((defun comp-tests-ret-type-spec-f (x) (when (>= 3 x) x)) - (or null float (integer * 3))) + '(or null float (integer * 3))) ;; 28 ((defun comp-tests-ret-type-spec-f (x) (when (< 3 x) x)) - (or null float (integer 4 *))) + '(or null float (integer 4 *))) ;; 29 ((defun comp-tests-ret-type-spec-f (x) (when (<= 3 x) x)) - (or null float (integer 3 *))) + '(or null float (integer 3 *))) ;; 30 ((defun comp-tests-ret-type-spec-f (x) (let ((y 3)) (when (> x y) x))) - (or null float (integer 4 *))) + '(or null float (integer 4 *))) ;; 31 ((defun comp-tests-ret-type-spec-f (x) (let ((y 3)) (when (> y x) x))) - (or null float (integer * 2))) + '(or null float (integer * 2))) ;; 32 ((defun comp-tests-ret-type-spec-f (x) (when (and (> x 3) (< x 10)) x)) - (or null float (integer 4 9))) + '(or null float (integer 4 9))) ;; 33 ((defun comp-tests-ret-type-spec-f (x) (when (or (> x 3) (< x 10)) x)) - (or null float integer)) + '(or null float integer)) ;; 34 ((defun comp-tests-ret-type-spec-f (x) (when (or (< x 3) (> x 10)) x)) - (or null float (integer * 2) (integer 11 *))) + '(or null float (integer * 2) (integer 11 *))) ;; 35 No float range support. ((defun comp-tests-ret-type-spec-f (x) (when (> x 1.0) x)) - (or null marker number)) + '(or null marker number)) ;; 36 ((defun comp-tests-ret-type-spec-f (x y) (when (and (> x 3) (> y 2)) (+ x y))) - (or null float (integer 7 *))) + '(or null float (integer 7 *))) ;; 37 ;; SBCL: (OR REAL NULL) @@ -1103,14 +1103,14 @@ comp-tests-check-ret-type-spec (when (and (<= x 3) (<= y 2)) (+ x y))) - (or null float (integer * 5))) + '(or null float (integer * 5))) ;; 38 ((defun comp-tests-ret-type-spec-f (x y) (when (and (< 1 x 5) (< 1 y 5)) (+ x y))) - (or null float (integer 4 8))) + '(or null float (integer 4 8))) ;; 39 ;; SBCL gives: (OR REAL NULL) @@ -1118,7 +1118,7 @@ comp-tests-check-ret-type-spec (when (and (<= 1 x 10) (<= 2 y 3)) (+ x y))) - (or null float (integer 3 13))) + '(or null float (integer 3 13))) ;; 40 ;; SBCL: (OR REAL NULL) @@ -1126,42 +1126,42 @@ comp-tests-check-ret-type-spec (when (and (<= 1 x 10) (<= 2 y 3)) (- x y))) - (or null float (integer -2 8))) + '(or null float (integer -2 8))) ;; 41 ((defun comp-tests-ret-type-spec-f (x y) (when (and (<= 1 x) (<= 2 y 3)) (- x y))) - (or null float (integer -2 *))) + '(or null float (integer -2 *))) ;; 42 ((defun comp-tests-ret-type-spec-f (x y) (when (and (<= 1 x 10) (<= 2 y)) (- x y))) - (or null float (integer * 8))) + '(or null float (integer * 8))) ;; 43 ((defun comp-tests-ret-type-spec-f (x y) (when (and (<= x 10) (<= 2 y)) (- x y))) - (or null float (integer * 8))) + '(or null float (integer * 8))) ;; 44 ((defun comp-tests-ret-type-spec-f (x y) (when (and (<= x 10) (<= y 3)) (- x y))) - (or null float integer)) + '(or null float integer)) ;; 45 ((defun comp-tests-ret-type-spec-f (x y) (when (and (<= 2 x) (<= 3 y)) (- x y))) - (or null float integer)) + '(or null float integer)) ;; 46 ;; SBCL: (OR (RATIONAL (6) (30)) (SINGLE-FLOAT 6.0 30.0) @@ -1174,63 +1174,63 @@ comp-tests-check-ret-type-spec (< 1 j 5) (< 1 k 5)) (+ x y z i j k))) - (or null float (integer 12 24))) + '(or null float (integer 12 24))) ;; 47 ((defun comp-tests-ret-type-spec-f (x) (when (<= 1 x 5) (1+ x))) - (or null float (integer 2 6))) + '(or null float (integer 2 6))) ;;48 ((defun comp-tests-ret-type-spec-f (x) (when (<= 1 x 5) (1- x))) - (or null float (integer 0 4))) + '(or null float (integer 0 4))) ;; 49 ((defun comp-tests-ret-type-spec-f () (error "Foo")) - nil) + 'nil) ;; 50 ((defun comp-tests-ret-type-spec-f (x) (if (stringp x) x 'bar)) - (or (member bar) string)) + '(or (member bar) string)) ;; 51 ((defun comp-tests-ret-type-spec-f (x) (if (stringp x) 'bar x)) - (not string)) + '(not string)) ;; 52 ((defun comp-tests-ret-type-spec-f (x) (if (integerp x) x 'bar)) - (or (member bar) integer)) + '(or (member bar) integer)) ;; 53 ((defun comp-tests-ret-type-spec-f (x) (when (integerp x) x)) - (or null integer)) + '(or null integer)) ;; 54 ((defun comp-tests-ret-type-spec-f (x) (unless (symbolp x) x)) - t) + 't) ;; 55 ((defun comp-tests-ret-type-spec-f (x) (unless (integerp x) x)) - (not integer)) + '(not integer)) ;; 56 ((defun comp-tests-ret-type-spec-f (x) @@ -1238,7 +1238,7 @@ comp-tests-check-ret-type-spec (1 (message "one")) (5 (message "five"))) x) - t + 't ;; FIXME improve `comp-cond-cstrs-target-mvar' to cross block ;; boundary if necessary as this should return: ;; (or (integer 1 1) (integer 5 5)) @@ -1250,7 +1250,7 @@ comp-tests-check-ret-type-spec (eql x 3)) (error "Not foo or 3")) x) - (or (member foo) (integer 3 3))) + '(or (member foo) (integer 3 3))) ;;58 ((defun comp-tests-ret-type-spec-f (x y) @@ -1259,7 +1259,7 @@ comp-tests-check-ret-type-spec (<= x y)) x (error ""))) - (integer 0 *)) + '(integer 0 *)) ;; 59 ((defun comp-tests-ret-type-spec-f (x y) @@ -1268,7 +1268,7 @@ comp-tests-check-ret-type-spec (<= x y)) x (error ""))) - (or float (integer 3 10))) + '(or float (integer 3 10))) ;; 60 ((defun comp-tests-ret-type-spec-f (x y) @@ -1277,56 +1277,56 @@ comp-tests-check-ret-type-spec (>= x y)) x (error ""))) - (or float (integer 3 10))) + '(or float (integer 3 10))) ;; 61 ((defun comp-tests-ret-type-spec-f (x) (if (= x 1.0) x (error ""))) - (or (member 1.0) (integer 1 1))) + '(or (member 1.0) (integer 1 1))) ;; 62 ((defun comp-tests-ret-type-spec-f (x) (if (= x 1.0) x (error ""))) - (or (member 1.0) (integer 1 1))) + '(or (member 1.0) (integer 1 1))) ;; 63 ((defun comp-tests-ret-type-spec-f (x) (if (= x 1.1) x (error ""))) - (member 1.1)) + '(member 1.1)) ;; 64 ((defun comp-tests-ret-type-spec-f (x) (if (= x 1) x (error ""))) - (or (member 1.0) (integer 1 1))) + '(or (member 1.0) (integer 1 1))) ;; 65 ((defun comp-tests-ret-type-spec-f (x) (if (= x 1) x (error ""))) - (or (member 1.0) (integer 1 1))) + '(or (member 1.0) (integer 1 1))) ;; 66 ((defun comp-tests-ret-type-spec-f (x) (if (eql x 0.0) x (error ""))) - float) + 'float) ;; 67 ((defun comp-tests-ret-type-spec-f (x) (if (equal x '(1 2 3)) x (error ""))) - cons) + 'cons) ;; 68 ((defun comp-tests-ret-type-spec-f (x) @@ -1335,7 +1335,7 @@ comp-tests-check-ret-type-spec x (error ""))) ;; Conservative (see cstr relax in `comp-cstr-='). - (or (member 1.0) (integer 1 1))) + '(or (member 1.0) (integer 1 1))) ;; 69 ((defun comp-tests-ret-type-spec-f (x) @@ -1344,7 +1344,7 @@ comp-tests-check-ret-type-spec x (error ""))) ;; Conservative (see cstr relax in `comp-cstr-='). - (or (member 1.0) (integer 1 1))) + '(or (member 1.0) (integer 1 1))) ;; 70 ((defun comp-tests-ret-type-spec-f (x y) @@ -1353,14 +1353,14 @@ comp-tests-check-ret-type-spec (= x y)) x (error ""))) - (or float integer)) + '(or float integer)) ;; 71 ((defun comp-tests-ret-type-spec-f (x) (if (= x 0.0) x (error ""))) - (or (member -0.0 0.0) (integer 0 0))) + '(or (member -0.0 0.0) (integer 0 0))) ;; 72 ((defun comp-tests-ret-type-spec-f (x) @@ -1369,27 +1369,27 @@ comp-tests-check-ret-type-spec (unless (eql x -0.0) (error "")) x) - float) + 'float) ;; 73 ((defun comp-tests-ret-type-spec-f (x) (when (eql x 1.0) (error "")) x) - t) + 't) ;; 74 ((defun comp-tests-ret-type-spec-f (x) (if (eq x 0) (error "") (1+ x))) - number))) + 'number))) (defun comp-tests-define-type-spec-test (number x) `(comp-deftest ,(intern (format "ret-type-spec-%d" number)) () ,(format "Type specifier test number %d." number) (let ((comp-ctxt (make-comp-cstr-ctxt))) - (comp-tests-check-ret-type-spec ',(car x) ',(cadr x)))))) + (comp-tests-check-ret-type-spec ',(car x) ,(cadr x)))))) (defmacro comp-tests-define-type-spec-tests () "Define all type specifier tests." @@ -1472,8 +1472,4 @@ comp-tests-cond-rw-checker-type (equal (comp-mvar-typeset mvar) comp-tests-cond-rw-expected-type)))))))) -;; Local Variables: -;; no-byte-compile: t -;; End: - ;;; comp-tests.el ends here