Subject: SUN Solaris 7 / GCC 2.95.2 instruction failure on compile

From: [email-masked]
Date: Thu, 9 Nov 2000 09:35:45 -0500 (EST)

Compiling with SUNs compiler works fine, with gcc this results:

gcc -g -O2   -c  mbx.c
mbx.c: In function `mbx_hdrpos':
mbx.c:1371: internal error--unrecognizable insn:
(insn 78 76 80 (set (reg:SI 129)
        (minus:SI (const_int 4 [0x4])
            (const_int -4096 [0xfffff000]))) -1 (nil)
    (expr_list:REG_EQUAL (const_int 4100 [0x1004])
        (nil)))
*** Error code 1
make: Fatal error: Command failed for target `mbx.o'
Current working directory /xfr3/pine4.30/imap/c-client

-  ___________.___________________.________
- < Al Piszcz | [email-masked] | MITRE  >

-- 
-----------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/pine/pine-info/
-----------------------------------------------------------------

---

From: [email-masked] (Trond Eivind Glomsrød)
Date: 09 Nov 2000 09:52:05 -0500

> Current working directory /xfr3/pine4.30/imap/c-client

This patch works around this:

--- pine4.30/imap/src/osdep/unix/mbx.c.sparc	Mon Oct 30 18:01:37 2000
+++ pine4.30/imap/src/osdep/unix/mbx.c	Mon Oct 30 18:08:05 2000
@@ -1333,7 +1333,8 @@
 				/* paranoia check */
   if (LOCAL->buflen < (HDRBUFLEN + SLOP)) {
     fs_give ((void **) &LOCAL->buf);
-    LOCAL->buf = (char *) fs_get ((LOCAL->buflen = HDRBUFLEN) + SLOP);
+    LOCAL->buflen = HDRBUFLEN;
+    LOCAL->buf = (char *) fs_get (LOCAL->buflen + SLOP);
   }
   lseek (LOCAL->fd,ret,L_SET);	/* get to header position */
   for (siz = 0, s = LOCAL->buf;	/* read HDRBUFLEN chunks with 4 byte slop */

-- 
Trond Eivind Glomsrød
Red Hat, Inc.