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: GCSE problem involving mem_first_set.


> Date: Mon, 14 Sep 1998 11:36:02 -0600
> From: Jeffrey A Law <law@cygnus.com>

>   > The problem is in GCSE; in the variables mem_first_set and
>   > mem_last_set, 0 is used as a flag value meaning 'never set' but 0 can
>   > also be a valid CUID.  I fixed it by using -1 as the flag value; see
>   > patch attached.
>   > 
>   > This should probably be in egcs 1.1.1 if it is ever released.
> Seems to me this would be a whole lot simpler to fix by making the
> first assigned CUID have the value 1. 
> 
> Any particular reason you didn't do that?

I did consider this (you can just replace i++ by ++i on the
appropriate line).  The CUIDs are used to index bit vectors, though,
and since bit vectors are indexed from 0 it seemed reasonable to start
the CUIDs from 0 too.

Feel free to try that instead.

-- 
Geoffrey Keating <geoffk@ozemail.com.au>


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