The source:

procedure AdaFF is
  type rec is
    record
      null;
    end record;
  X : rec;
begin
  null;
end AdaFF;

produces output by:
$ rm -f adaff{,.o,.ali};gnatmake -g adaff.adb ;readelf -a --debug-dump adaff |
grep 'DW_AT_byte_size.*0xffff'
    <30b>   DW_AT_byte_size   : 0xffffffff      

 <1><306>: Abbrev Number: 20 (DW_TAG_structure_type)
    <307>   DW_AT_name        : (indirect string, offset: 0x3c8):
ada_main__main__TsehB___XUT
    <30b>   DW_AT_byte_size   : 0xffffffff
    <30f>   DW_AT_decl_file   : 1
    <310>   DW_AT_decl_line   : 105
    <311>   DW_AT_sibling     : <0x33b>

A more complicated testcase
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.ada/packed_tagged/comp_bug.adb?rev=1.1&cvsroot=src
crashes GDB eating all the memory on `print x' there.


-- 
           Summary: debug info invalid x86_64 DW_AT_byte_size 0xffffffff
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jan dot kratochvil at redhat dot com
 GCC build triplet: x86_64-fedora-linux-gnu
  GCC host triplet: x86_64-fedora-linux-gnu
GCC target triplet: x86_64-fedora-linux-gnu


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

Reply via email to