delorie.com/archives/browse.cgi | search |
From: | Michiel de Bondt <michielb AT sci DOT kun DOT nl> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | bug |
Date: | Wed, 28 Feb 2001 14:20:35 +0100 |
Organization: | University of Nijmegen |
Lines: | 48 |
Message-ID: | <3A9CFB23.86C6D3EF@sci.kun.nl> |
NNTP-Posting-Host: | fanth.sci.kun.nl |
Mime-Version: | 1.0 |
X-Trace: | wnnews.sci.kun.nl 983366436 11105 131.174.132.54 (28 Feb 2001 13:20:36 GMT) |
X-Complaints-To: | usenet AT sci DOT kun DOT nl |
NNTP-Posting-Date: | Wed, 28 Feb 2001 13:20:36 +0000 (UTC) |
X-Mailer: | Mozilla 4.75 [en] (X11; U; SunOS 5.7 sun4u) |
X-Accept-Language: | en |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
This is a multi-part message in MIME format. --------------524796937C70976A6AFCB0C8 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello djgpp-ers, I think I found a bug in gcc. But first, I had to mail the bug to this newsgroup. gcc allocates an occupied register for a computation. I made the following small sample file of the problem. You should cancel optimization, otherwise the problem does not occur due to removal of code. Best regard, Michiel de Bondt --------------524796937C70976A6AFCB0C8 Content-Type: text/plain; charset=us-ascii; name="regs.cpp" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="regs.cpp" // do not use optimization union intel { long e; short x; struct { char l; char h; } b; }; int main () { register union intel a __asm__ ("%eax"); register union intel b __asm__ ("%ebx"); register union intel c __asm__ ("%ecx"); register union intel d __asm__ ("%edx"); b.b.l++; } --------------524796937C70976A6AFCB0C8--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |