Article View: gnu.gcc.bug
Article #1782Nasty bug in gcc 1.29: one <= zero
From: Gene Spafford
Date: Wed, 12 Oct 1988 02:55
Date: Wed, 12 Oct 1988 02:55
36 lines
1427 bytes
1427 bytes
Index:
gcc 1.29 + 2 fixes from RMS
Sun 3/60 under SunOS 3.4
Sun 3/50 under SunOS 4.0
Code:
#include <assert.h>
main ()
{
int x;
x = (1>0 ? 23 : 17);
printf ("x = %d\n", x);
if (1>0) printf ("true\n");
else printf ("false\n");
assert (1>0);
assert ((1)>0);
}
Script:
Script started on Tue Oct 11 21:51:24 1988
uther(184) > gcc -v bug.c
gcc version 1.29
/u17/serc/lib/gcc-cpp -v -undef -D__GNU__ -D__GNUC__ -Dmc68000 -Dsun -Dunix -D__HAVE_68881__ -Dmc68020 bug.c /tmp/cca02673.cpp
GNU CPP version 1.29
/u17/serc/lib/gcc-cc1 /tmp/cca02673.cpp -quiet -dumpbase bug.c -version -o /tmp/cca02673.s
GNU C version 1.29 (68k, MIT syntax) compiled by GNU C version 1.29.
as -mc68020 /tmp/cca02673.s -o bug.o
ld /lib/crt0.o /lib/Mcrt1.o bug.o /u17/serc/lib/gcc-gnulib -lc
uther(185) > ./a.out
x = 17
false
Failed assertion 1>0 at line 9 of `bug.c'.
abort - core dumped
uther(186) > ^D
script done on Tue Oct 11 21:51:37 1988
Technical Details
Message-ID:
<8810120255.AA02685@uther.cs.purdue.edu>Path:
arc1-ca.pugleaf.net!utzoo!telly!ddsw1!mcdchg!rutgers!tut.cis.ohio-state.edu!PURDUE.EDU!spafShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!mcdchg!rutgers!tut.cis.ohio-state.edu!PURDUE.EDU!spaf From: spaf@PURDUE.EDU (Gene Spafford) Newsgroups: gnu.gcc.bug Subject: Nasty bug in gcc 1.29: one <= zero Summary: Gak! Message-ID: <8810120255.AA02685@uther.cs.purdue.edu> Date: 12 Oct 88 02:55:07 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: SERC, Department of Computer Sciences, Purdue Univ. Lines: 36