]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR middle-end/28865 (Structures with a flexible arrray member have wrong .size)
authorNick Clifton <nickc@redhat.com>
Thu, 16 Jan 2014 12:17:48 +0000 (12:17 +0000)
committerNick Clifton <nickc@gcc.gnu.org>
Thu, 16 Jan 2014 12:17:48 +0000 (12:17 +0000)
commit54c7a7f3b07b2198ecd84cdab579ec41057389f9
treef86b15eb863f6a929fad7d545aa4f7c28340eaa0
parent5147d10aa4b2b608a02fb885a5510c983e148f06
re PR middle-end/28865 (Structures with a flexible arrray member have wrong .size)

PR middle-end/28865

* varasm.c (output_constant): Return the number of bytes actually
emitted.
(output_constructor_array_range): Update the field size with the
number of bytes emitted by output_constant.
(output_constructor_regular_field): Likewise.  Also do not
  complain if the total number of bytes emitted is now greater
than the expected fieldpos.
* output.h (output_constant): Update prototype and descriptive
comment.

* gcc.c-torture/compile/pr28865.c: New.
* gcc.c-torture/execute/pr28865.c: New.

From-SVN: r206661
gcc/ChangeLog
gcc/output.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr28865.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/pr28865.c [new file with mode: 0644]
gcc/varasm.c