http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55684



Richard Biener <rguenth at gcc dot gnu.org> changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

             Target|i?86-*-*                    |i?86-*-*, x86_64-*-*

             Status|UNCONFIRMED                 |NEW

   Last reconfirmed|                            |2012-12-14

     Ever Confirmed|0                           |1



--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> 2012-12-14 
10:16:57 UTC ---

Reduced testcase:



typedef struct _IO_FILE FILE;

unsigned long int strtoul(const char *, char **, int);

char *fgets(char *, int, FILE *);

struct ihexrec {

    unsigned char reclen;

    unsigned char data[256];

};

static void srec_readrec(struct ihexrec * srec, char * rec)

{

  int i, j;

  char buf[8];

  int offset = 0, len;

  char * e;

  for (i=0; j<srec->reclen; j++)

    {

      if (offset+2 > len)

        return;

      for (i=0; i<2; i++)

        buf[i] = rec[offset++];

      srec->data[j] = strtoul(buf, &e, 16);

    }

  for (i=0; i<2; i++)

    buf[i] = rec[offset++];

}

void srec2b(FILE *inf)

{

  char buffer[256];

  struct ihexrec srec;

  while (fgets(buffer,256,inf)!=(void *)0)

    srec_readrec(&srec, buffer);

}



> ./cc1 -quiet -O2 fileio.3.3.i

fileio.3.3.i: In function 'srec2b':

fileio.3.3.i:25:6: internal compiler error: in remove_redundant_iv_tests, at

tree-ssa-loop-ivcanon.c:559

 void srec2b(FILE *inf)

      ^

Reply via email to