unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Andrea Corallo <akrl@sdf.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 51104@debbugs.gnu.org, Paul Eggert <eggert@cs.ucla.edu>,
	Andrea Corallo <andrea_corallo@yahoo.it>
Subject: bug#51104: comp-tests.elc messes up after reconfiguring for different machine
Date: Mon, 12 Sep 2022 15:30:16 +0000	[thread overview]
Message-ID: <xjfleqod307.fsf@ma.sdf.org> (raw)
In-Reply-To: <87h71c972r.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 12 Sep 2022 13:15:56 +0200")

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Paul Eggert <eggert@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





  parent reply	other threads:[~2022-09-12 15:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-08 22:59 bug#51104: comp-tests.elc messes up after reconfiguring for different machine Paul Eggert
2022-09-12 11:15 ` Lars Ingebrigtsen
2022-09-12 11:43   ` Eli Zaretskii
2022-09-12 15:30   ` Andrea Corallo [this message]
2022-09-12 17:54     ` Paul Eggert via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-12 19:34       ` Andrea Corallo
2022-09-12 20:34         ` Paul Eggert via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-12 21:05     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-13 11:21       ` Lars Ingebrigtsen
2022-09-13 13:39         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-13 14:09         ` Andrea Corallo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xjfleqod307.fsf@ma.sdf.org \
    --to=akrl@sdf.org \
    --cc=51104@debbugs.gnu.org \
    --cc=andrea_corallo@yahoo.it \
    --cc=eggert@cs.ucla.edu \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).