------- 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