This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch for incorrect execute/divconst-2.c



  In message <Pine.BSF.4.10.10003142020490.6219-100000@dair.pair.com>you write:
  > On Tue, 14 Mar 2000, Jeffrey A Law wrote:
  > >   In message <Pine.BSF.4.10.10003110755460.17527-100000@dair.pair.com>you
  >  write
  > >   > Unfortunately this uncovers other GCC problems: the "quot * -21474836
  > 48"
  > >   > gets optimized into "quot << 31" on a host with 32-bit HOST_WIDE_INTs
  > ,
  > >   > regardless of sizeof long on the actual target,
  > > When precisely is that not a safe thing to do?
  > 
  > When "long int" (the type of quot) is 64 bits on the target.
  > It is then wrong since -2147483648L != (1 << 31).
  > The correct optimization would then be -(quot) << 31.
Can you find out where this is happening?  I would guess it's happening
before/during RTL generation. 
 
jeff



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]