home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / gnu / gcc / bug / 2624 < prev    next >
Encoding:
Text File  |  1992-11-07  |  1.4 KB  |  37 lines

  1. Newsgroups: gnu.gcc.bug
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!sun-barr!ames!saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!leonardo.synnet.com!eric
  3. From: eric@leonardo.synnet.com (Eric Baur)
  4. Subject: gcc-2.3.1 -fpic problem [simple patch]
  5. Message-ID: <1992Nov5.044206.1456@pau.synnet.com>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: Synernetics Inc
  8. Distribution: gnu
  9. Date: Thu, 5 Nov 1992 04:42:06 GMT
  10. Approved: bug-gcc@prep.ai.mit.edu
  11. Lines: 24
  12.  
  13. Apparently new code was added to 2.3.1 to simplify some expressions is
  14. assembler output. This broke -fpic.  Attempting to output pic data
  15. references causes the compiler to abort. Here's a simple patch to
  16. varasm.c which seems to cure the problem. 
  17.  
  18. 2217,2220c2217,2218
  19. <   if ( GET_CODE (XEXP (x, 1)) != PC ) 
  20. <       {
  21. <           decode_rtx_const (GET_MODE (x), XEXP (x, 0), &val0);
  22. <           decode_rtx_const (GET_MODE (x), XEXP (x, 1), &val1);
  23. ---
  24. >   decode_rtx_const (GET_MODE (x), XEXP (x, 0), &val0);
  25. >   decode_rtx_const (GET_MODE (x), XEXP (x, 1), &val1);
  26. 2222,2224c2220,2221
  27. <           if (val0.un.addr.base == val1.un.addr.base)
  28. <               return GEN_INT (val0.un.addr.offset - val1.un.addr.offset);
  29. <       }
  30. ---
  31. >   if (val0.un.addr.base == val1.un.addr.base)
  32. >     return GEN_INT (val0.un.addr.offset - val1.un.addr.offset);
  33.  
  34. Eric Baur                       eric@synnet.com
  35. Synernetics Inc                 (508) 670-9009
  36.  
  37.