This is the mail archive of the gcc-bugs@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]

[Bug tree-optimization/30840] [4.3 Regression] ice for legal code with flags -O3 -fno-strict-aliasing



------- Comment #10 from pinskia at gcc dot gnu dot org  2007-08-20 11:55 -------
Here is a new reduced testcase (compile at -O3 -fno-strict-aliasing):
struct rxvt_salloc {
  char *firstblock;
  unsigned int firstfree;
};
struct line_t {
   unsigned int *t;
   unsigned int f;
};
struct rxvt_salloc *talloc;
struct line_t *row_buf;
static inline unsigned * alloc (struct rxvt_salloc *this1)
{
  void *r;
  if (this1->firstfree > 65536)
    this1->firstfree = 4;
  r = (void *) ((char *)this1->firstblock + this1->firstfree);
  return (unsigned *)r;
}
void
scr_reset (int qlines)
{
  struct line_t *qline;
  int qrow;
  for (qrow = 0; qlines--; qrow++)
      (qline = row_buf)->t = alloc (talloc);
  qline->f &= ~0x0001;
  qline->t = alloc (talloc);
}


-- 


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


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