Re: [PATCH] middle-end/77608: object size estimate with variable offsets

2022-01-10 Thread Jakub Jelinek via Gcc-patches
On Wed, Jan 05, 2022 at 06:50:58PM +0530, Siddhesh Poyarekar wrote: > --- a/gcc/tree-object-size.c > +++ b/gcc/tree-object-size.c > @@ -347,10 +347,21 @@ init_offset_limit (void) > be positive and hence, be within OFFSET_LIMIT for valid offsets. */ > > static tree > -size_for_offset (tree s

[PATCH] middle-end/77608: object size estimate with variable offsets

2022-01-05 Thread Siddhesh Poyarekar
This partially fixes middle-end/77608 by making __builtin_object_size return the whole object size instead of bailing out in case the offset in the object is variable and the maximum estimate is requested. gcc/ChangeLog: PR middle-end/77608 * tree-object-size.c (size_for_offset):