Re: [PATCH] avoid MEM_REF when looking for poor-man's flexible arrays (PR 86914)

2018-08-14 Thread Jeff Law
On 08/14/2018 01:01 PM, Martin Sebor wrote: > Attached is a patch to avoid calling array_at_struct_end_p() > with a MEM_REF argument.  The function returns false even if > the reference does point into such a flexible array member, > as in: > >   struct A { char i, a[1]; }; >   void f (struct A *p

[PATCH] avoid MEM_REF when looking for poor-man's flexible arrays (PR 86914)

2018-08-14 Thread Martin Sebor
Attached is a patch to avoid calling array_at_struct_end_p() with a MEM_REF argument. The function returns false even if the reference does point into such a flexible array member, as in: struct A { char i, a[1]; }; void f (struct A *p) { return strlen (p->a + 1); } This fix will li