🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #1266

gcc-2.3.1 -fpic problem [simple patch]

#1266
From: Eric Baur
Date: Thu, 05 Nov 1992 04:42
23 lines
1464 bytes
Apparently new code was added to 2.3.1 to simplify some expressions is
assembler output. This broke -fpic.  Attempting to output pic data
references causes the compiler to abort. Here's a simple patch to
varasm.c which seems to cure the problem. 

2217,2220c2217,2218
<   if ( GET_CODE (XEXP (x, 1)) != PC ) 
<       {
<           decode_rtx_const (GET_MODE (x), XEXP (x, 0), &val0);
<           decode_rtx_const (GET_MODE (x), XEXP (x, 1), &val1);
---
>   decode_rtx_const (GET_MODE (x), XEXP (x, 0), &val0);
>   decode_rtx_const (GET_MODE (x), XEXP (x, 1), &val1);
2222,2224c2220,2221
<           if (val0.un.addr.base == val1.un.addr.base)
<               return GEN_INT (val0.un.addr.offset - val1.un.addr.offset);
<       }
---
>   if (val0.un.addr.base == val1.un.addr.base)
>     return GEN_INT (val0.un.addr.offset - val1.un.addr.offset);

Eric Baur                       eric@synnet.com
Synernetics Inc                 (508) 670-9009
Technical Details
Message-ID: <1992Nov5.044206.1456@pau.synnet.com>
Path: arc1-ca.pugleaf.net!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

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug
Path: arc1-ca.pugleaf.net!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
From: eric@leonardo.synnet.com (Eric Baur)
Subject: gcc-2.3.1 -fpic problem [simple patch]
Message-ID: <1992Nov5.044206.1456@pau.synnet.com>
Sender: gnulists@ai.mit.edu
Organization: Synernetics Inc
Distribution: gnu
Date: Thu, 5 Nov 1992 04:42:06 GMT
Approved: bug-gcc@prep.ai.mit.edu
Lines: 24