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

Roger Sayle <roger at nextmovesoftware dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |roger at 
nextmovesoftware dot com
             Status|NEW                         |ASSIGNED

--- Comment #7 from Roger Sayle <roger at nextmovesoftware dot com> ---
Created attachment 63466
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63466&action=edit
proposed patch

I have a fix [already bootstrapped, currently regression testing].  The code in
store_constructor is currently unaware of the C99 semantics of passing
structures
by value containing flexible array members.  Andrew's code in comment #5 is
valid (confirming an ICE-on-valid-regression), but Xingbang's function foo in
the original report is broken, as the b array isn't passed, and accessing b[0]
is (I believe) undefined behaviour.  Ideally, we should issue some kind of
warning.

Reply via email to