[Bug bootstrap/41395] [4.5 regression] Revision 151800 failed bootstrap

rguenth at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Tue Sep 22 11:49:00 GMT 2009



------- Comment #27 from rguenth at gcc dot gnu dot org  2009-09-22 11:48 -------
struct VEC_char_base
{
  unsigned num;
  unsigned alloc;
  short vec[1];
};

short __attribute__((noinline))
foo (struct VEC_char_base *p, int i)
{
  short *q;
  p->vec[i] = 0;
  q = &p->vec[1];
  *q = 1;
  return p->vec[i];
}

extern void abort (void);
extern void *malloc (__SIZE_TYPE__);

int
main()
{
  struct VEC_char_base *p = malloc (sizeof (struct VEC_char_base));
  if (foo (p, 1) != 1)
    abort ();
  return 0;
}


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|jamborm at gcc dot gnu dot  |rguenth at gcc dot gnu dot
                   |org                         |org


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



More information about the Gcc-bugs mailing list