[Bug middle-end/28865] Structures with a flexible arrray member have wrong .size
nickc at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jan 16 12:18:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28865
--- Comment #26 from Nick Clifton <nickc at gcc dot gnu.org> ---
Author: nickc
Date: Thu Jan 16 12:17:48 2014
New Revision: 206661
URL: http://gcc.gnu.org/viewcvs?rev=206661&root=gcc&view=rev
Log:
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.
Added:
trunk/gcc/testsuite/gcc.c-torture/compile/pr28865.c
trunk/gcc/testsuite/gcc.c-torture/execute/pr28865.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/output.h
trunk/gcc/testsuite/ChangeLog
trunk/gcc/varasm.c
More information about the Gcc-bugs
mailing list