This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix wrong offset in DWARF


On Fri, Apr 17, 2009 at 9:46 PM, Eric Botcazou <ebotcazou@adacore.com> wrote:
> Hi,
>
> when a field has a non-constant size (this of course can happen in Ada :-),
> simple_type_size_in_bits returns the alignment in bits but field_byte_offset
> picks BITS_PER_WORD for the field size; so a field with non-constant size at
> offset 0 with 16-bit alignment is wrongly output at offset 2.
>
> Fixed by using simple_type_size_in_bits for the field size in this case.
>
> Tested (GCC, GDB) on i586-suse-linux, OK for mainline?

Ok.

Thanks,
Richard.

>
> 2009-04-17 ?Eric Botcazou ?<ebotcazou@adacore.com>
>
> ? ? ? ?* dwarf2out.c (field_byte_offset): Use the type size as the field size
> ? ? ? ?if the latter is not constant.
>
>
> --
> Eric Botcazou
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]