From xemacs-m  Tue Feb 25 15:18:39 1997
Received: from altair.xemacs.org (steve@xemacs.miranova.com [206.190.83.19])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id PAA08101
	for <xemacs-beta@xemacs.org>; Tue, 25 Feb 1997 15:18:36 -0600 (CST)
Received: (from steve@localhost)
	by altair.xemacs.org (8.8.5/8.8.5) id NAA19724;
	Tue, 25 Feb 1997 13:30:16 -0800
Mail-Copies-To: never
To: xemacs-beta@xemacs.org
Subject: Re: message-make-message-id problems, anybody?
References: <199702251433.PAA18387@midnight.eng.ecf.teradyne.com> <rxsbu98fys3.fsf@midnight.ecf.teradyne.com>
X-Url: http://www.miranova.com/%7Esteve/
X-Face: #!T9!#9s-3o8)*uHlX{Ug[xW7E7Wr!*L46-OxqMu\xz23v|R9q}lH?cRS{rCNe^'[`^sr5"
 f8*@r4ipO6Jl!:Ccq<xoV[Qz2u8<8-+Vwf2gzJ44lf_/y9OaQ`@#Q65{U4/TC)i2`~/M&QI$X>p:9I
 OSS'2{-)-4wBnVeg0S\O4Al@)uC[pD|+
X-Attribution: sb
From: Steven L Baur <steve@miranova.com>
In-Reply-To: Adrian Aichner's message of 25 Feb 1997 20:49:14 +0100
Mime-Version: 1.0 (generated by tm-edit 7.105)
Content-Type: text/plain; charset=US-ASCII
Date: 25 Feb 1997 13:30:09 -0800
Message-ID: <m2pvxo7evy.fsf@altair.xemacs.org>
Lines: 48
X-Mailer: Gnus v5.4.15/XEmacs 20.1

Adrian Aichner writes:

>>>>>> "Adrian" == Adrian Aichner <aichner@ecf.teradyne.com> writes:
> Hello All,

> That's what it boils down to:

> What is (% 8 36) ?

> Well that depends:

> xemacs-20.1-b1 compiled '-g -xO5' says 8

This is correct.

> xemacs-20.1-b1 compiled '-g -fast' says 36

This is not correct.

> This is causing my `message-mail' problem in xemacs-20.1-b2.

 ...

> Can anybody confirm the rather severe bug?

It sounds like you have found a compiler optimization bug.  The "%"
function is in src/data.c:

DEFUN ("%", Frem, 2, 2, 0, /*
Return remainder of first arg divided by second.
Both must be integers, characters or markers.
*/
       (num1, num2))
{
  CHECK_INT_COERCE_CHAR_OR_MARKER (num1);
  CHECK_INT_COERCE_CHAR_OR_MARKER (num2);

  if (ZEROP (num2))
    Fsignal (Qarith_error, Qnil);

  return (make_int (XINT (num1) % XINT (num2)));
}

Compare the generated assembly language for that function under the
different optimization levels.
-- 
steve@miranova.com baur
Unsolicited commercial e-mail will be billed at $250/message.

