egcs-980205 : bug in insn-extract.c on sparc-sun-solaris2.5.1 ?

Laurent Bonnaud bonnaud@irisa.fr
Thu Feb 12 06:38:00 GMT 1998


Hi,

i checked cc1plus with purify and it found an "Array bounds read" in
insn-extract.c, line 51 :

    case 394:
      for (i = XVECLEN (pat, 0); i >= 0; i--)
          ro[i] = XVECEXP (pat, 0, i);

I don't know anything about gcc internals but if you trust variable
names, this should be

      for (i = XVECLEN (pat, 0)-1; i >= 0; i--)
          ro[i] = XVECEXP (pat, 0, i);

The file insn-extract.c is machine generated, so i don't know where to
patch, but it should be easy to find for someone else.

Purify also found a lot of memory leaks.  Before reporting them, i
would like to know whether someone with a better knowledge of gcc
internals regularly checks it.

-- 
Laurent.



More information about the Gcc-bugs mailing list