Mail Archives: djgpp/2001/02/28/08:36:30

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: <>
Mime-Version: 1.0
X-Trace: 983366436 11105 (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.
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

Best regard, Michiel de Bondt

Content-Type: text/plain; charset=us-ascii;
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;

// 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");


- Raw text -

  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019