GNU bug report logs - #51104
comp-tests.elc messes up after reconfiguring for different machine

Previous Next

Package: emacs;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Fri, 8 Oct 2021 23:00:02 UTC

Severity: minor

Tags: moreinfo

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 51104 in the body.
You can then email your comments to 51104 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#51104; Package emacs. (Fri, 08 Oct 2021 23:00:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Paul Eggert <eggert <at> cs.ucla.edu>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 08 Oct 2021 23:00:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Emacs bug reports and feature requests <bug-gnu-emacs <at> gnu.org>
Cc: Andrea Corallo <andrea_corallo <at> yahoo.it>
Subject: comp-tests.elc messes up after reconfiguring for different machine
Date: Fri, 8 Oct 2021 15:59:06 -0700
When trying out the emacs-28 branch on both 32- and 64-bit platforms, I 
had test failures that I tracked down to this line:

test/src/comp-tests.el:933:       (integer ,most-negative-fixnum 
,most-positive-fixnum))

My problem was that I'd built test/src/comp-tests.elc on a 32-bit 
platform (using "./configure CC='gcc -m32'" on an x86-64 machine) so 
that .elc file had been built assuming 32-bit values for 
most-negative-fixnum and most-positive fixnum. When I then re-ran 
'configure' for a 64-bit platform the .elc files were not automatically 
rebuilt for it (they're supposed to be machine-independent, right?) and 
so the optimizations were incorrect for a 64-bit platform and the tests 
failed.

What's a good way to fix this problem, while still testing everything 
that comp-tests.el wants to test?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51104; Package emacs. (Mon, 12 Sep 2022 11:17:02 GMT) Full text and rfc822 format available.

Message #8 received at 51104 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 51104 <at> debbugs.gnu.org, Andrea Corallo <andrea_corallo <at> yahoo.it>
Subject: Re: bug#51104: comp-tests.elc messes up after reconfiguring for
 different machine
Date: Mon, 12 Sep 2022 13:15:56 +0200
Paul Eggert <eggert <at> cs.ucla.edu> writes:

> When trying out the emacs-28 branch on both 32- and 64-bit platforms,
> I had test failures that I tracked down to this line:
>
> test/src/comp-tests.el:933:       (integer ,most-negative-fixnum
> ,most-positive-fixnum))
>
> My problem was that I'd built test/src/comp-tests.elc on a 32-bit
> platform (using "./configure CC='gcc -m32'" on an x86-64 machine) so
> that .elc file had been built assuming 32-bit values for
> most-negative-fixnum and most-positive fixnum. When I then re-ran
> 'configure' for a 64-bit platform the .elc files were not
> automatically rebuilt for it (they're supposed to be
> machine-independent, right?) and so the optimizations were incorrect
> for a 64-bit platform and the tests failed.
>
> What's a good way to fix this problem, while still testing everything
> that comp-tests.el wants to test?

This was a year ago, but the code in question seems unchanged now on
"master":

      ;; 14
      ((defun comp-tests-ret-type-spec-f (x)
         (comp-hint-fixnum x))
       (integer ,most-negative-fixnum ,most-positive-fixnum))

So I guess the problem is still present?  (I haven't tested myself.)

Andrea, do you see any way to fix this test for this 32-bit/64-bit
scenarion?




Severity set to 'minor' from 'normal' Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 12 Sep 2022 11:17:02 GMT) Full text and rfc822 format available.

Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 12 Sep 2022 11:17:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51104; Package emacs. (Mon, 12 Sep 2022 11:45:02 GMT) Full text and rfc822 format available.

Message #15 received at 51104 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 51104 <at> debbugs.gnu.org, eggert <at> cs.ucla.edu, andrea_corallo <at> yahoo.it
Subject: Re: bug#51104: comp-tests.elc messes up after reconfiguring for
 different machine
Date: Mon, 12 Sep 2022 14:43:40 +0300
> Cc: 51104 <at> debbugs.gnu.org, Andrea Corallo <andrea_corallo <at> yahoo.it>
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Date: Mon, 12 Sep 2022 13:15:56 +0200
> 
> Paul Eggert <eggert <at> cs.ucla.edu> writes:
> 
> > When trying out the emacs-28 branch on both 32- and 64-bit platforms,
> > I had test failures that I tracked down to this line:
> >
> > test/src/comp-tests.el:933:       (integer ,most-negative-fixnum
> > ,most-positive-fixnum))
> >
> > My problem was that I'd built test/src/comp-tests.elc on a 32-bit
> > platform (using "./configure CC='gcc -m32'" on an x86-64 machine) so
> > that .elc file had been built assuming 32-bit values for
> > most-negative-fixnum and most-positive fixnum. When I then re-ran
> > 'configure' for a 64-bit platform the .elc files were not
> > automatically rebuilt for it (they're supposed to be
> > machine-independent, right?) and so the optimizations were incorrect
> > for a 64-bit platform and the tests failed.
> >
> > What's a good way to fix this problem, while still testing everything
> > that comp-tests.el wants to test?
> 
> This was a year ago, but the code in question seems unchanged now on
> "master":
> 
>       ;; 14
>       ((defun comp-tests-ret-type-spec-f (x)
>          (comp-hint-fixnum x))
>        (integer ,most-negative-fixnum ,most-positive-fixnum))
> 
> So I guess the problem is still present?  (I haven't tested myself.)
> 
> Andrea, do you see any way to fix this test for this 32-bit/64-bit
> scenarion?

Is comp-tests.el supposed to run when Emacs is built without
native-compilation? if so, what does it test in that case?

And if comp-tests.el is supposed to run only in a native-compilation
build, then I'd expect to see comp-test.eln run, not comp-test.elc,
and *.eln files are architecture-specific to begin with.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51104; Package emacs. (Mon, 12 Sep 2022 15:31:01 GMT) Full text and rfc822 format available.

Message #18 received at 51104 <at> debbugs.gnu.org (full text, mbox):

From: Andrea Corallo <akrl <at> sdf.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 51104 <at> debbugs.gnu.org, Paul Eggert <eggert <at> cs.ucla.edu>,
 Andrea Corallo <andrea_corallo <at> yahoo.it>
Subject: Re: bug#51104: comp-tests.elc messes up after reconfiguring for
 different machine
Date: Mon, 12 Sep 2022 15:30:16 +0000
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Paul Eggert <eggert <at> cs.ucla.edu> writes:
>
>> When trying out the emacs-28 branch on both 32- and 64-bit platforms,
>> I had test failures that I tracked down to this line:
>>
>> test/src/comp-tests.el:933:       (integer ,most-negative-fixnum
>> ,most-positive-fixnum))
>>
>> My problem was that I'd built test/src/comp-tests.elc on a 32-bit
>> platform (using "./configure CC='gcc -m32'" on an x86-64 machine) so
>> that .elc file had been built assuming 32-bit values for
>> most-negative-fixnum and most-positive fixnum. When I then re-ran
>> 'configure' for a 64-bit platform the .elc files were not
>> automatically rebuilt for it (they're supposed to be
>> machine-independent, right?) and so the optimizations were incorrect
>> for a 64-bit platform and the tests failed.
>>
>> What's a good way to fix this problem, while still testing everything
>> that comp-tests.el wants to test?
>
> This was a year ago, but the code in question seems unchanged now on
> "master":
>
>       ;; 14
>       ((defun comp-tests-ret-type-spec-f (x)
>          (comp-hint-fixnum x))
>        (integer ,most-negative-fixnum ,most-positive-fixnum))
>
> So I guess the problem is still present?  (I haven't tested myself.)
>
> Andrea, do you see any way to fix this test for this 32-bit/64-bit
> scenarion?

Hi Lars,

I think here IIUC we are using a .elc file (comp-tests.elc) compiled an
an arch X to test .eln files for architectures different than X.

`most-negative-fixnum' is replaced at byte-compilation time with a value
that is indeed arch dependent.  This is because we have some macrology
to defines those tests.

I believe in theory should be possible to move this computation in the
compile time to keep "comp-tests.elc" arch indepent if this is
requirement.

Best Regards

  Andrea




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51104; Package emacs. (Mon, 12 Sep 2022 17:55:01 GMT) Full text and rfc822 format available.

Message #21 received at 51104 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Andrea Corallo <akrl <at> sdf.org>, Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 51104 <at> debbugs.gnu.org, Andrea Corallo <andrea_corallo <at> yahoo.it>
Subject: Re: bug#51104: comp-tests.elc messes up after reconfiguring for
 different machine
Date: Mon, 12 Sep 2022 12:54:36 -0500
On 9/12/22 10:30, Andrea Corallo wrote:
> I believe in theory should be possible to move this computation in the
> compile time to keep "comp-tests.elc" arch indepent if this is
> requirement.

As I understand it, .elc files are supposed to be architecture independent.

Is Lars onto something when he says this should be a .eln file instead? 
I don't recall what comp-tests.el does.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51104; Package emacs. (Mon, 12 Sep 2022 19:35:02 GMT) Full text and rfc822 format available.

Message #24 received at 51104 <at> debbugs.gnu.org (full text, mbox):

From: Andrea Corallo <akrl <at> sdf.org>
To: Paul Eggert via "Bug reports for GNU Emacs, the Swiss army knife of text
 editors" <bug-gnu-emacs <at> gnu.org>
Cc: 51104 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>,
 Paul Eggert <eggert <at> cs.ucla.edu>, Andrea Corallo <andrea_corallo <at> yahoo.it>
Subject: Re: bug#51104: comp-tests.elc messes up after reconfiguring for
 different machine
Date: Mon, 12 Sep 2022 19:34:49 +0000
Paul Eggert via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <bug-gnu-emacs <at> gnu.org> writes:

> On 9/12/22 10:30, Andrea Corallo wrote:
>> I believe in theory should be possible to move this computation in the
>> compile time to keep "comp-tests.elc" arch indepent if this is
>> requirement.
>
> As I understand it, .elc files are supposed to be architecture independent.
>
> Is Lars onto something when he says this should be a .eln file
> instead? I don't recall what comp-tests.el does.

comp-tests.el just tests the native compiler (in this case the ret type
prediction it does).

I guess here make check does byte-compile comp-tests.el but being the
tests executed with a non-interactive emacs this is never native compiled
afterward (it would hide the issue).

Probably the quickest and easiest fix is just to add the
`no-byte-compile' into comp-tests.el.

  Andrea




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51104; Package emacs. (Mon, 12 Sep 2022 19:36:01 GMT) Full text and rfc822 format available.

Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Mon, 12 Sep 2022 20:35:02 GMT) Full text and rfc822 format available.

Notification sent to Paul Eggert <eggert <at> cs.ucla.edu>:
bug acknowledged by developer. (Mon, 12 Sep 2022 20:35:02 GMT) Full text and rfc822 format available.

Message #32 received at 51104-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Andrea Corallo <akrl <at> sdf.org>
Cc: 51104-done <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>,
 Andrea Corallo <andrea_corallo <at> yahoo.it>
Subject: Re: bug#51104: comp-tests.elc messes up after reconfiguring for
 different machine
Date: Mon, 12 Sep 2022 15:34:29 -0500
[Message part 1 (text/plain, inline)]
On 9/12/22 14:34, Andrea Corallo wrote:
> Probably the quickest and easiest fix is just to add the
> `no-byte-compile' into comp-tests.el.

Thanks for the suggestion. I installed the attached and am closing the 
bug report.
[0001-Fix-comp-tests.el-problem-after-reconfiguring.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51104; Package emacs. (Mon, 12 Sep 2022 21:06:01 GMT) Full text and rfc822 format available.

Message #35 received at 51104 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Andrea Corallo <akrl <at> sdf.org>
Cc: 51104 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>,
 Paul Eggert <eggert <at> cs.ucla.edu>, Andrea Corallo <andrea_corallo <at> yahoo.it>
Subject: Re: bug#51104: comp-tests.elc messes up after reconfiguring for
 different machine
Date: Mon, 12 Sep 2022 17:05:20 -0400
>> 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





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51104; Package emacs. (Tue, 13 Sep 2022 11:23:01 GMT) Full text and rfc822 format available.

Message #38 received at 51104 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 51104 <at> debbugs.gnu.org, Paul Eggert <eggert <at> cs.ucla.edu>,
 Andrea Corallo <andrea_corallo <at> yahoo.it>, Andrea Corallo <akrl <at> sdf.org>
Subject: Re: bug#51104: comp-tests.elc messes up after reconfiguring for
 different machine
Date: Tue, 13 Sep 2022 13:21:53 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>>> 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?

I think that looks better than disabling byte-compilation (because the
comp tests are already slow enough 😀).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51104; Package emacs. (Tue, 13 Sep 2022 13:41:01 GMT) Full text and rfc822 format available.

Message #41 received at 51104 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 51104 <at> debbugs.gnu.org, Paul Eggert <eggert <at> cs.ucla.edu>,
 Andrea Corallo <andrea_corallo <at> yahoo.it>, Andrea Corallo <akrl <at> sdf.org>
Subject: Re: bug#51104: comp-tests.elc messes up after reconfiguring for
 different machine
Date: Tue, 13 Sep 2022 09:39:54 -0400
Lars Ingebrigtsen [2022-09-13 13:21:53] wrote:
> Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>>>> 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?
> I think that looks better than disabling byte-compilation (because the
> comp tests are already slow enough 😀).

Pushed,


        Stefan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51104; Package emacs. (Tue, 13 Sep 2022 14:10:04 GMT) Full text and rfc822 format available.

Message #44 received at 51104 <at> debbugs.gnu.org (full text, mbox):

From: Andrea Corallo <akrl <at> sdf.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 51104 <at> debbugs.gnu.org, Paul Eggert <eggert <at> cs.ucla.edu>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>,
 Andrea Corallo <andrea_corallo <at> yahoo.it>
Subject: Re: bug#51104: comp-tests.elc messes up after reconfiguring for
 different machine
Date: Tue, 13 Sep 2022 14:09:04 +0000
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>
>>>> 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?
>
> I think that looks better than disabling byte-compilation (because the
> comp tests are already slow enough 😀).

Comp tests are unfortunatelly slow not because comp-tests.el is slow but
because of the compiler itself is not fast :/

Anyway Stefan fix is certanly nicer, I feel sorry for not having had the
time to look into it myself.

Thanks!

  Andrea




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 12 Oct 2022 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 194 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.