Article View: gnu.gcc.bug
Article #780simple unsigned expr comparison bug in 1.35
From: Brad Parker
Date: Sat, 11 Nov 1989 23:51
Date: Sat, 11 Nov 1989 23:51
45 lines
898 bytes
898 bytes
Using gcc 1.35 (sorry, I'm still not up to 1.36) on a Sun 3/280, SunOS 4.0.3
(gcc -S -O t.c)
The following C code:
--- cut here ---
typedef unsigned char byte;
byte times;
func()
{
if (times-- <= 1)
{
times = 1;
}
}
---
Produces the following asm which is incorrect:
--- cut here ---
#NO_APP
gcc_compiled.:
.text
.even
.globl _func
_func:
link a6,#0
subqb #1,_times
jne L2 <--- ??
moveb #1,_times
L2:
unlk a6
rts
.comm _times,2
---
-brad
Technical Details
Message-ID:
<8911112351.AA08470@cuba.Cayman.COM>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!cayman.com!bradShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!cayman.com!brad From: brad@cayman.com (Brad Parker) Newsgroups: gnu.gcc.bug Subject: simple unsigned expr comparison bug in 1.35 Message-ID: <8911112351.AA08470@cuba.Cayman.COM> Date: 11 Nov 89 23:51:49 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 45