diff options
author | Nick Clifton <nickc@redhat.com> | 2014-01-16 12:17:48 +0000 |
---|---|---|
committer | Nick Clifton <nickc@gcc.gnu.org> | 2014-01-16 12:17:48 +0000 |
commit | 54c7a7f3b07b2198ecd84cdab579ec41057389f9 (patch) | |
tree | f86b15eb863f6a929fad7d545aa4f7c28340eaa0 /gcc/output.h | |
parent | 5147d10aa4b2b608a02fb885a5510c983e148f06 (diff) | |
download | gcc-54c7a7f3b07b2198ecd84cdab579ec41057389f9.zip gcc-54c7a7f3b07b2198ecd84cdab579ec41057389f9.tar.gz gcc-54c7a7f3b07b2198ecd84cdab579ec41057389f9.tar.bz2 |
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
Diffstat (limited to 'gcc/output.h')
-rw-r--r-- | gcc/output.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/output.h b/gcc/output.h index 15a2b97..fead3d3 100644 --- a/gcc/output.h +++ b/gcc/output.h @@ -294,11 +294,13 @@ extern void output_quoted_string (FILE *, const char *); This includes the pseudo-op such as ".int" or ".byte", and a newline. Assumes output_addressed_constants has been done on EXP already. - Generate exactly SIZE bytes of assembler data, padding at the end - with zeros if necessary. SIZE must always be specified. + Generate at least SIZE bytes of assembler data, padding at the end + with zeros if necessary. SIZE must always be specified. The returned + value is the actual number of bytes of assembler data generated, which + may be bigger than SIZE if the object contains a variable length field. ALIGN is the alignment in bits that may be assumed for the data. */ -extern void output_constant (tree, unsigned HOST_WIDE_INT, unsigned int); +extern unsigned HOST_WIDE_INT output_constant (tree, unsigned HOST_WIDE_INT, unsigned int); /* When outputting delayed branch sequences, this rtx holds the sequence being output. It is null when no delayed branch |