Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!flame.oracle.com!wbailey From: wbailey@flame.oracle.com (Bill Bailey) Newsgroups: gnu.gcc.bug Subject: probable generic bug with gcc 1.36 with LONG_MIN Message-ID: <9002010528.AA02590@flame.oracle.com> Date: 1 Feb 90 05:28:31 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 30 Dear rms: I believe the code below demonstrates a generic bug with gcc 1.36. It is at least a problem on sparc where I built gcc 1.36. It prints "false, true" when it should print "false, false." Note the second if clause is the problematic one, I include the first simply to illustrate the inconsistency. I spent some time in dbx working on this. The problem almost certainly has to do with the routine shorten_compare() but I can't quite pin it down. Please let me know if there is a simple fix. Thank you. wbailey@oracle.com main() { char i = 1; int j = 1; if ( i < -128 ) printf("true, "); else printf("false, "); if ( j < -2147483648 ) printf("true\n"); else printf("false\n"); }