This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: gcc, mplayer and profile (mcount)


Andrew Haley <aph@redhat.com> writes:

> Trivia time: what is the longest delay between a bug being committed
> to gcc before someone notices and a fix being committed?  This one is
> eleven years and eight months.  I wonder if we have a record.

As it happens, I can beat that.  I've found a bug in local-alloc.c
which was commited before 1992.  And I haven't even commited the fix
yet.

The bug is in this code is in these tests in combine_regs:

      /* Do not combine registers unless one fits within the other.  */
      || (offset > 0 && usize + offset > ssize)
      || (offset < 0 && usize + offset < ssize)

They should be written as

      || (offset > 0 && ssize + offset > usize)
      || (offset < 0 && ssize + offset < usize)

I spent a few hours trying to produce a test case to show this, but I
failed.  I couldn't figure out a way to get one pseudo-register to be
at an offset from another pseudo-register.  However, it's fairly easy
to create a test case using my REG_SUBREG_DEAD patch.

Ian


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