Path: utzoo!utgpu!watmath!uunet!xanth!nic.MR.NET!thor!mike From: mike@thor.stolaf.edu (Mike Haertel) Newsgroups: unix-pc.general Subject: Re: compiling gcc-1.31 Summary: found "the" bug Message-ID: <805@thor.stolaf.edu> Date: 11 Dec 88 02:59:50 GMT References: <796@thor.stolaf.edu> <455@manta.pha.pa.us> Reply-To: mike@wheaties.ai..mit.edu Organization: St. Olaf College, Northfield, MN Lines: 51 In article <455@manta.pha.pa.us> brant@manta.pha.pa.us (Brant Cheikes) writes: >The gcc-1.31 that I'm running successfully compiled the latest >web2c/TeX/LaTeX available from ics.uci.edu. I needed the -traditional >and -writable-strings options on web2c and tangle, but the actual >web2c-generated C source compiled fine with just -O. [. . .] > >I tried building Gnu Emacs 18.52 using every combination of -O, >-traditional, and -writable-strings, with no luck. An executable was >created that consistently core-dumped while loading rmail. I haven't >tried to track the problem down. I didn't need to use -fwritable-strings or -traditional to compile web2c. I got my copy from labrea.stanford.edu; the last time I looked that was more recent than the one available from ics.uci.edu. Emacs didn't work. After cross-compiling gcc, I downloaded the source and spent some time hunting around in the code. The following diff tells all. I used the bugged gcc to compile a clean one, and used that one to recompile itself, just in case. Emacs works now too. Or at least rmail and C-X C-B no longer dump core. I don't use rmail, but I *do* like the multiple buffer things; emacs as a single file editor just doesn't cut it :-) I am mailing these changes to Richard, so they should appear in the next version of gcc. *** tm-3b1.h~ Thu Nov 17 11:14:12 1988 --- tm-3b1.h Fri Dec 9 22:15:54 1988 *************** *** 282,287 if (scale != 1) fprintf (FILE, ":%d", scale); \ fprintf (FILE, ")"); \ break; } \ if (ireg != 0 || breg != 0) \ { int scale = 1; \ if (breg == 0) \ --- 282,293 ----- if (scale != 1) fprintf (FILE, ":%d", scale); \ fprintf (FILE, ")"); \ break; } \ + if (breg != 0 && ireg == 0 && GET_CODE (addr) == LABEL_REF) \ + { fprintf (FILE, "LD%%%d(%%pc,%s.l", \ + CODE_LABEL_NUMBER (XEXP (addr, 0)), \ + reg_name[REGNO (breg)]); \ + putc (')', FILE); \ + break; } \ if (ireg != 0 || breg != 0) \ { int scale = 1; \ if (breg == 0) \ -- Mike Haertel mike@wheaties.ai.mit.edu In Hell they run VMS.