Ping * 2 : Fwd: [V9][PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-06-13 Thread Qing Zhao via Gcc-patches
to move this patch forward. > > Thanks a lot for the help. > > Qing > > Begin forwarded message: > > From: Qing Zhao mailto:qing.z...@oracle.com>> > Subject: [V9][PATCH 1/2] Handle component_ref to a structre/union field > including flexible array mem

Ping: Fwd: [V9][PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-06-05 Thread Qing Zhao via Gcc-patches
t: [V9][PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832] Date: May 30, 2023 at 2:30:28 PM EDT To: jos...@codesourcery.com<mailto:jos...@codesourcery.com>, richard.guent...@gmail.com<mailto:richard.guent...@gmail.com>, ja...@re

[V9][PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-05-30 Thread Qing Zhao via Gcc-patches
Richard or Jakub, could you please review this patch and see whether it's Okay to commit? thanks a lot. Qing === GCC extension accepts the case when a struct with a C99 flexible array member is embedded into another struct or union (possibly recursively) as

[V8][PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-05-25 Thread Qing Zhao via Gcc-patches
GCC extension accepts the case when a struct with a C99 flexible array member is embedded into another struct or union (possibly recursively) as the last field. __builtin_object_size should treat such struct as flexible size. gcc/c/ChangeLog: PR tree-optimization/101832 *

Re: [V7][PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-05-25 Thread Qing Zhao via Gcc-patches
> On May 25, 2023, at 1:41 AM, Bernhard Reutner-Fischer > wrote: > > On 24 May 2023 16:09:21 CEST, Qing Zhao wrote: >> Bernhard, >> >> Thanks a lot for your comments. >> >>> On May 19, 2023, at 7:11 PM, Bernhard Reutner-Fischer >>> wrote: >>> >>> On Fri, 19 May 2023 20:49:47 + >>>

Re: [V7][PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-05-24 Thread Bernhard Reutner-Fischer via Gcc-patches
On 24 May 2023 16:09:21 CEST, Qing Zhao wrote: >Bernhard, > >Thanks a lot for your comments. > >> On May 19, 2023, at 7:11 PM, Bernhard Reutner-Fischer >> wrote: >> >> On Fri, 19 May 2023 20:49:47 + >> Qing Zhao via Gcc-patches wrote: >> >>> GCC extension accepts the case when a struct

[PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-05-24 Thread Qing Zhao via Gcc-patches
GCC extension accepts the case when a struct with a C99 flexible array member is embedded into another struct or union (possibly recursively) as the last field. __builtin_object_size should treat such struct as flexible size. gcc/c/ChangeLog: PR tree-optimization/101832 *

Re: [V7][PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-05-24 Thread Qing Zhao via Gcc-patches
Bernhard, Thanks a lot for your comments. > On May 19, 2023, at 7:11 PM, Bernhard Reutner-Fischer > wrote: > > On Fri, 19 May 2023 20:49:47 + > Qing Zhao via Gcc-patches wrote: > >> GCC extension accepts the case when a struct with a flexible array member >> is embedded into another

Re: [V7][PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-05-19 Thread Bernhard Reutner-Fischer via Gcc-patches
On Fri, 19 May 2023 20:49:47 + Qing Zhao via Gcc-patches wrote: > GCC extension accepts the case when a struct with a flexible array member > is embedded into another struct or union (possibly recursively). Do you mean TYPE_TRAILING_FLEXARRAY()? > diff --git a/gcc/tree.h b/gcc/tree.h >

[V7][PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-05-19 Thread Qing Zhao via Gcc-patches
GCC extension accepts the case when a struct with a flexible array member is embedded into another struct or union (possibly recursively). __builtin_object_size should treat such struct as flexible size. gcc/c/ChangeLog: PR tree-optimization/101832 * c-decl.cc (finish_struct):

Ping * 3: [V6][PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-04-20 Thread Qing Zhao via Gcc-patches
Hi, Is this patch ready for GCC14? Thanks. Qing Begin forwarded message: From: Qing Zhao via Gcc-patches mailto:gcc-patches@gcc.gnu.org>> Subject: Fwd: [V6][PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832] Date: April 11, 2023 at 9

Re: [V6][PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-04-17 Thread Qing Zhao via Gcc-patches
Thanks a lot for the testing, Kees. Jakub, do you have any more comment on the 6th version of the patches? Is it ready for the GCC13 commit? Or we need to delay it to GCC14? This patch has been there waiting for approving for a while, I think that it’s a nice improvement to GCC and also help to

Re: [V6][PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-04-12 Thread Kees Cook via Gcc-patches
On Tue, Mar 28, 2023 at 03:49:43PM +, Qing Zhao wrote: > the C front-end has been approved by Joseph. > > Jacub, could you please eview the middle end part of the changes of this > patch? > > The major change is in tree-object-size.cc (addr_object_size). > (To use the new

Fwd: [V6][PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-04-11 Thread Qing Zhao via Gcc-patches
@gcc.gnu.org>> Subject: Fwd: [V6][PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832] Date: April 4, 2023 at 9:06:37 AM EDT To: Jakub Jelinek mailto:ja...@redhat.com>> Cc: Joseph Myers mailto:jos...@codesourcery.com>>

Fwd: [V6][PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-04-04 Thread Qing Zhao via Gcc-patches
Ping… Qing Begin forwarded message: From: Qing Zhao mailto:qing.z...@oracle.com>> Subject: [V6][PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832] Date: March 28, 2023 at 11:49:43 AM EDT To: ja...@redhat.com<mailto:ja...@redhat.c

[V6][PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-03-28 Thread Qing Zhao via Gcc-patches
the C front-end has been approved by Joseph. Jacub, could you please eview the middle end part of the changes of this patch? The major change is in tree-object-size.cc (addr_object_size). (To use the new TYPE_INCLUDE_FLEXARRAY info). This patch is to fix

Re: [V5][PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-03-27 Thread Qing Zhao via Gcc-patches
AM, Qing Zhao via Gcc-patches > wrote: > > Ping… > > Please let me know if you have any further comments on the patch. > > thanks. > > Qing > > > Begin forwarded message: > > From: Qing Zhao mailto:qing.z...@oracle.com>> > Subject: [V5][PAT

Re: [V5][PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-03-27 Thread Qing Zhao via Gcc-patches
> On Mar 23, 2023, at 2:55 PM, Joseph Myers wrote: > > On Thu, 23 Mar 2023, Qing Zhao via Gcc-patches wrote: > >> gcc/c/ChangeLog: >> >> PR tree-optimization/101832 >> * c-decl.cc (finish_struct): Set TYPE_INCLUDE_FLEXARRAY for >> struct/union type. > > The C front-end

Re: Fwd: [V5][PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-03-23 Thread Joseph Myers
On Thu, 23 Mar 2023, Qing Zhao via Gcc-patches wrote: > gcc/c/ChangeLog: > > PR tree-optimization/101832 > * c-decl.cc (finish_struct): Set TYPE_INCLUDE_FLEXARRAY for > struct/union type. The C front-end changes are OK (supposing the original patch has correct whitespace,

Fwd: [V5][PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-03-23 Thread Qing Zhao via Gcc-patches
Ping… Please let me know if you have any further comments on the patch. thanks. Qing Begin forwarded message: From: Qing Zhao mailto:qing.z...@oracle.com>> Subject: [V5][PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832] Date: March 16

[V5][PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-03-16 Thread Qing Zhao via Gcc-patches
GCC extension accepts the case when a struct with a flexible array member is embedded into another struct or union (possibly recursively). __builtin_object_size should treat such struct as flexible size per -fstrict-flex-arrays. gcc/c/ChangeLog: PR tree-optimization/101832 *

Re: [PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-02-10 Thread Qing Zhao via Gcc-patches
Thanks, Kees. If there is no objection, I will update my patches with this. And send the updated patches soon. Qing > On Feb 9, 2023, at 11:46 AM, Kees Cook wrote: > > On Thu, Feb 09, 2023 at 02:40:57PM +, Qing Zhao wrote: >> So, the major question here is: >> >> in addition to the C99

Re: [PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-02-09 Thread Kees Cook via Gcc-patches
On Thu, Feb 09, 2023 at 02:40:57PM +, Qing Zhao wrote: > So, the major question here is: > > in addition to the C99 standard flexible array member [ ], shall we include > [0], [1] or even [4] into this extension, and treat the structure with a > trailing [0], [1], or [4] embedded into

Re: [PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-02-09 Thread Qing Zhao via Gcc-patches
> On Feb 8, 2023, at 6:18 PM, Qing Zhao via Gcc-patches > wrote: > > > >> On Feb 8, 2023, at 2:09 PM, Joseph Myers wrote: >> >> On Wed, 8 Feb 2023, Qing Zhao via Gcc-patches wrote: >> >>> But I noticed that “flexible_array_type_p” later was moved from FE to >>> middle-end and put into

Re: [PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-02-09 Thread Qing Zhao via Gcc-patches
> On Feb 9, 2023, at 5:35 AM, Richard Biener wrote: > > On Wed, 8 Feb 2023, Qing Zhao wrote: > >> >> >>> On Feb 7, 2023, at 6:37 PM, Joseph Myers wrote: >>> >>> On Tue, 7 Feb 2023, Qing Zhao via Gcc-patches wrote: >>> Then, this routine (flexible_array_type_p) is mainly for

Re: [PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-02-09 Thread Richard Biener via Gcc-patches
On Wed, 8 Feb 2023, Qing Zhao wrote: > > > > On Feb 7, 2023, at 6:37 PM, Joseph Myers wrote: > > > > On Tue, 7 Feb 2023, Qing Zhao via Gcc-patches wrote: > > > >> Then, this routine (flexible_array_type_p) is mainly for diagnostic > >> purpose. > >> It cannot be used to determine whether

Re: [PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-02-08 Thread Qing Zhao via Gcc-patches
> On Feb 8, 2023, at 2:09 PM, Joseph Myers wrote: > > On Wed, 8 Feb 2023, Qing Zhao via Gcc-patches wrote: > >> But I noticed that “flexible_array_type_p” later was moved from FE to >> middle-end and put into tree.cc, tree.h as a general utility routine, and to >> >> /* Determine whether

Re: [PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-02-08 Thread Qing Zhao via Gcc-patches
> On Feb 8, 2023, at 2:20 PM, Siddhesh Poyarekar wrote: > > On 2023-02-08 14:09, Joseph Myers wrote: >> What must be avoided is -pedantic diagnostics for >> struct flex1 { int n; int data[1]; }; >> struct out_flex_end1 { int m; struct flex1 flex_data; }; >> regardless of whether considered

Re: [PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-02-08 Thread Joseph Myers
On Wed, 8 Feb 2023, Siddhesh Poyarekar wrote: > On 2023-02-08 14:09, Joseph Myers wrote: > > What must be avoided is -pedantic diagnostics for > > > > struct flex1 { int n; int data[1]; }; > > struct out_flex_end1 { int m; struct flex1 flex_data; }; > > > > regardless of whether considered

Re: [PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-02-08 Thread Siddhesh Poyarekar
On 2023-02-08 14:09, Joseph Myers wrote: What must be avoided is -pedantic diagnostics for struct flex1 { int n; int data[1]; }; struct out_flex_end1 { int m; struct flex1 flex_data; }; regardless of whether considered flexible or not, since that's clearly valid in standard C. Are you sure

Re: [PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-02-08 Thread Joseph Myers
On Wed, 8 Feb 2023, Qing Zhao via Gcc-patches wrote: > But I noticed that “flexible_array_type_p” later was moved from FE to > middle-end and put into tree.cc, tree.h as a general utility routine, and to > > /* Determine whether TYPE is a structure with a flexible array member, >or a union

Re: [PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-02-08 Thread Qing Zhao via Gcc-patches
> On Feb 7, 2023, at 6:37 PM, Joseph Myers wrote: > > On Tue, 7 Feb 2023, Qing Zhao via Gcc-patches wrote: > >> Then, this routine (flexible_array_type_p) is mainly for diagnostic purpose. >> It cannot be used to determine whether the structure/union type recursively >> include a flexible

Re: [PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-02-07 Thread Joseph Myers
On Tue, 7 Feb 2023, Qing Zhao via Gcc-patches wrote: > Then, this routine (flexible_array_type_p) is mainly for diagnostic purpose. > It cannot be used to determine whether the structure/union type recursively > include a flexible array member at the end. > > Is my understanding correct? My

Re: [PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-02-07 Thread Qing Zhao via Gcc-patches
> On Feb 7, 2023, at 2:17 PM, Joseph Myers wrote: > > On Tue, 7 Feb 2023, Qing Zhao via Gcc-patches wrote: > >> 1. Structure with flexible array member embedded into other structures >> recursively, for example: >> >> struct A { >> int n; >> char data[]; >> }; >> >> struct B { >> int

Re: [PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-02-07 Thread Joseph Myers
On Tue, 7 Feb 2023, Qing Zhao via Gcc-patches wrote: > 1. Structure with flexible array member embedded into other structures > recursively, for example: > > struct A { > int n; > char data[]; > }; > > struct B { > int m; > struct A a; > }; > > struct C { > int q; > struct B b; >

Re: [PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-02-07 Thread Qing Zhao via Gcc-patches
> On Feb 7, 2023, at 10:28 AM, Siddhesh Poyarekar wrote: > > On 2023-02-06 18:14, Joseph Myers wrote: >> On Mon, 6 Feb 2023, Qing Zhao via Gcc-patches wrote: >>> In GCC14: >>> >>> 1. Include this new warning -Wgnu-varaible-sized-type-not-at-end to -Wall >>> 2. Deprecate this extension from

Re: [PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-02-07 Thread Siddhesh Poyarekar
On 2023-02-06 18:14, Joseph Myers wrote: On Mon, 6 Feb 2023, Qing Zhao via Gcc-patches wrote: In GCC14: 1. Include this new warning -Wgnu-varaible-sized-type-not-at-end to -Wall 2. Deprecate this extension from GCC. (Or delay this to next release?). Any deprecation, or inclusion in -Wall,

Re: [PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-02-07 Thread Qing Zhao via Gcc-patches
Hi, Joseph, > On Feb 6, 2023, at 6:14 PM, Joseph Myers wrote: > > On Mon, 6 Feb 2023, Qing Zhao via Gcc-patches wrote: > >> In GCC14: >> >> 1. Include this new warning -Wgnu-varaible-sized-type-not-at-end to -Wall >> 2. Deprecate this extension from GCC. (Or delay this to next release?). >

Re: [PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-02-06 Thread Joseph Myers
On Mon, 6 Feb 2023, Qing Zhao via Gcc-patches wrote: > In GCC14: > > 1. Include this new warning -Wgnu-varaible-sized-type-not-at-end to -Wall > 2. Deprecate this extension from GCC. (Or delay this to next release?). Any deprecation, or inclusion in -Wall, would best come with evidence about

Re: [PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-02-06 Thread Qing Zhao via Gcc-patches
> On Feb 6, 2023, at 4:31 AM, Richard Biener wrote: > > On Fri, 3 Feb 2023, Qing Zhao wrote: > >> >> >>> On Feb 3, 2023, at 2:49 AM, Richard Biener wrote: >>> >>> On Thu, 2 Feb 2023, Qing Zhao wrote: >>> > On Feb 2, 2023, at 8:54 AM, Richard Biener wrote: > > On

Re: [PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-02-06 Thread Richard Biener via Gcc-patches
On Fri, 3 Feb 2023, Qing Zhao wrote: > > > > On Feb 3, 2023, at 2:49 AM, Richard Biener wrote: > > > > On Thu, 2 Feb 2023, Qing Zhao wrote: > > > >> > >> > >>> On Feb 2, 2023, at 8:54 AM, Richard Biener wrote: > >>> > >>> On Thu, 2 Feb 2023, Qing Zhao wrote: > >>> > > > > >

Re: [PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-02-03 Thread Qing Zhao via Gcc-patches
> On Feb 3, 2023, at 2:49 AM, Richard Biener wrote: > > On Thu, 2 Feb 2023, Qing Zhao wrote: > >> >> >>> On Feb 2, 2023, at 8:54 AM, Richard Biener wrote: >>> >>> On Thu, 2 Feb 2023, Qing Zhao wrote: >>> > > [...] > + return flexible_size_type_p (TREE_TYPE

Re: [PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-02-02 Thread Richard Biener via Gcc-patches
On Thu, 2 Feb 2023, Qing Zhao wrote: > > > > On Feb 2, 2023, at 8:54 AM, Richard Biener wrote: > > > > On Thu, 2 Feb 2023, Qing Zhao wrote: > > > >> > >> [...] > >> + return flexible_size_type_p (TREE_TYPE (last)); > > > > For types with many members this can become

Re: [PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-02-02 Thread Qing Zhao via Gcc-patches
> On Feb 2, 2023, at 8:54 AM, Richard Biener wrote: > > On Thu, 2 Feb 2023, Qing Zhao wrote: > >> >> >>> On Feb 2, 2023, at 3:07 AM, Richard Biener wrote: >>> >>> On Wed, 1 Feb 2023, Qing Zhao wrote: >>> > On Feb 1, 2023, at 6:41 AM, Richard Biener wrote: > >

Re: [PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-02-02 Thread Richard Biener via Gcc-patches
On Thu, 2 Feb 2023, Qing Zhao wrote: > > > > On Feb 2, 2023, at 3:07 AM, Richard Biener wrote: > > > > On Wed, 1 Feb 2023, Qing Zhao wrote: > > > >> > >> > >>> On Feb 1, 2023, at 6:41 AM, Richard Biener wrote: > >>> > >>> On Tue, 31 Jan 2023, Qing Zhao wrote: > >>> > GCC extension

Re: [PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-02-02 Thread Qing Zhao via Gcc-patches
> On Feb 2, 2023, at 3:07 AM, Richard Biener wrote: > > On Wed, 1 Feb 2023, Qing Zhao wrote: > >> >> >>> On Feb 1, 2023, at 6:41 AM, Richard Biener wrote: >>> >>> On Tue, 31 Jan 2023, Qing Zhao wrote: >>> GCC extension accepts the case when a struct with a flexible array member

Re: [PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-02-02 Thread Richard Biener via Gcc-patches
On Wed, 1 Feb 2023, Qing Zhao wrote: > > > > On Feb 1, 2023, at 6:41 AM, Richard Biener wrote: > > > > On Tue, 31 Jan 2023, Qing Zhao wrote: > > > >> GCC extension accepts the case when a struct with a flexible array member > >> is embedded into another struct (possibly recursively). > >>

Re: [PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-02-01 Thread Qing Zhao via Gcc-patches
Siddhesh, Thanks. I will update the testing case per your change. Qing > On Feb 1, 2023, at 11:48 AM, Siddhesh Poyarekar wrote: > > On 2023-01-31 09:11, Qing Zhao wrote: >> GCC extension accepts the case when a struct with a flexible array member >> is embedded into another struct (possibly

Re: [PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-02-01 Thread Siddhesh Poyarekar
On 2023-01-31 09:11, Qing Zhao wrote: GCC extension accepts the case when a struct with a flexible array member is embedded into another struct (possibly recursively). __builtin_object_size should treat such struct as flexible size per -fstrict-flex-arrays. PR tree-optimization/101832

Re: [PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-02-01 Thread Qing Zhao via Gcc-patches
> On Feb 1, 2023, at 6:41 AM, Richard Biener wrote: > > On Tue, 31 Jan 2023, Qing Zhao wrote: > >> GCC extension accepts the case when a struct with a flexible array member >> is embedded into another struct (possibly recursively). >> __builtin_object_size should treat such struct as flexible

Re: [PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-02-01 Thread Richard Biener via Gcc-patches
On Tue, 31 Jan 2023, Qing Zhao wrote: > GCC extension accepts the case when a struct with a flexible array member > is embedded into another struct (possibly recursively). > __builtin_object_size should treat such struct as flexible size per > -fstrict-flex-arrays. > > PR

[PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-01-31 Thread Qing Zhao via Gcc-patches
GCC extension accepts the case when a struct with a flexible array member is embedded into another struct (possibly recursively). __builtin_object_size should treat such struct as flexible size per -fstrict-flex-arrays. PR tree-optimization/101832 gcc/ChangeLog: PR