Date: Mon, 12 Nov 2001 14:26:33 +0100 (MET) From: ahelm AT gmx DOT net To: djgpp AT delorie DOT com Cc: pavenis AT lanet DOT lv MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="========GMXBoundary322181005571593" Subject: Optimiser problem in DJGPP port of GCC v3.0.2 X-Authenticated-Sender: #0003579562 AT gmx DOT net X-Authenticated-IP: [194.201.128.5] Message-ID: <32218.1005571593@www41.gmx.net> X-Mailer: WWW-Mail 1.5 (Global Message Exchange) X-Flags: 0001 Reply-To: djgpp AT delorie DOT com This is a MIME encapsulated multipart message - please use a MIME-compliant e-mail program to open it. Dies ist eine mehrteilige Nachricht im MIME-Format - bitte verwenden Sie zum Lesen ein MIME-konformes Mailprogramm. --========GMXBoundary322181005571593 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, The attached example produces correct results when compiled without optimisation but using any optimisation level greater than 0 causes incorrect results. The hexadecimal output of the result shows that the higher 32 bits are incorrectly set to 1 when assigning a positive literal (long or long long) to a long long variable (in the "else" clause). This did work correctly in gcc v2.95.3 and also works in v3.0.2 on Solaris. So I suspect this is a DJGPP specific problem. Regards, Tony -- __________________________ Anton Helm Farnborough, Hampshire, UK mailto:ahelm AT gmx DOT net Sent through GMX FreeMail - http://www.gmx.net --========GMXBoundary322181005571593 Content-Type: application/x-unknown-content-type-PFE32; name="O.c" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="O.c" I2luY2x1ZGUgPHN0ZGlvLmg+DQoNCmNvbnN0IGludCBhWzEwXSA9IHstMSwgMSwgMCwgMSwgLTEs IC0xLCAxLCAwLCAtMSwgLTF9Ow0KDQppbnQgbWFpbih2b2lkKQ0Kew0KICBsb25nIGxvbmcgczsN CiAgaW50IGk7DQoNCiAgZm9yKGk9MDtpPDEwO2krKykNCiAgew0KICAgIHMgPSBhW2ldOw0KICAg IGlmKHM8MCkNCiAgICB7DQogICAgICBzID0gLTIxNDc0ODM2NDhMTDsNCiAgICB9DQogICAgZWxz ZQ0KICAgIHsNCiAgICAgIHMgPSAyMTQ3NDgzNjQ3TEw7DQogICAgfQ0KICAgIGZwcmludGYoc3Rk ZXJyLCAiJWxsZCAlMDE2bGx4XG4iLCBzLCBzKTsNCiAgfQ0KDQogIHJldHVybiAwOw0KfQ0K --========GMXBoundary322181005571593--