https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117334

            Bug ID: 117334
           Summary: structure copy with flexible array member (2)
           Product: gcc
           Version: 14.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jbeulich at suse dot com
  Target Milestone: ---

Created attachment 59477
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59477&action=edit
respectively adjusted example

As requested there, cloning from bug 117333, 2nd issue:

Removing either half of the conditional in test() allows compilation to
succeed, yet the generated code then has accesses beyond sizeof(struct s). Imo
clause 22 in C99 section 6.2.1 gives a close enough example, where it is
explicitly stated that nothing past sizeof() would be copied.

Reply via email to