http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28865

--- Comment #15 from Nick Clifton <nickc at gcc dot gnu.org> ---
Created attachment 31802
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31802&action=edit
Fix gcc's emission of assembler directives for a variable length structure

Hi Guys,

  I think that the problem is the output_constant function in varasm.c which is
given a target size, but which can emit more bytes than expected if the
expression is a variable length structure.

  This patch updates output_constant so that it returns the number of bytes
that it really did emit, and it updates a couple of places where
output_constant is used so that this corrected size is taken into account.

  Tested without regressions on an i686-pc-linux-gnu toolchain and an
aarch64-elf toolchain.  Does anyone have any objections to my submitting the
patch to gcc-patches ?

Cheers
  Nick

Reply via email to