[Bug testsuite/25059] gcc/g++/gfortran/gnatmake 4.8 FAILs

cvs-commit at gcc dot gnu.org sourceware-bugzilla@sourceware.org
Thu Oct 3 13:03:00 GMT 2019


https://sourceware.org/bugzilla/show_bug.cgi?id=25059

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom de Vries <vries@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=42275044919fc1dda740d6172d0617f12a0ca2cf

commit 42275044919fc1dda740d6172d0617f12a0ca2cf
Author: Tom de Vries <tdevries@suse.de>
Date:   Thu Oct 3 15:02:58 2019 +0200

    [gdb/testsuite] Fix info-types.exp with gcc/g++ 4.8

    The gdb.base/info-types.exp test-case FAILs with gcc/g++ 4.8 because the
DWARF
    record for the 'unsigned int' type is missing in the executables, while it
is
    present for gcc/g++ 7.4.1.

    For a minimal example using gcc 7.4.1:
    ...
    $ echo "enum enum_t { AA, BB, CC }; enum enum_t var;" > enum.c
    $ gcc enum.c -c -g
    ...
    we find that the enum type has DW_AT_encoding 'unsigned':
     <1><1d>: Abbrev Number: 2 (DW_TAG_enumeration_type)
        <1e>   DW_AT_name        : (indirect string, offset: 0x1f): enum_t
        <22>   DW_AT_encoding    : 7        (unsigned)
        <23>   DW_AT_byte_size   : 4
        <24>   DW_AT_type        : <0x3e>
        <28>   DW_AT_decl_file   : 1
        <29>   DW_AT_decl_line   : 1
        <2a>   DW_AT_sibling     : <0x3e>
    ...
    and a DW_AT_type reference to the type 'unsigned int':
    ...
     <1><3e>: Abbrev Number: 4 (DW_TAG_base_type)
        <3f>   DW_AT_byte_size   : 4
        <40>   DW_AT_encoding    : 7        (unsigned)
        <41>   DW_AT_name        : (indirect string, offset: 0x26): unsigned
int
    ...

    With gcc 4.8.5 however, we have no 'unsigned' encoding, and no DW_AT_type:
    ...
     <1><1d>: Abbrev Number: 2 (DW_TAG_enumeration_type)
        <1e>   DW_AT_name        : (indirect string, offset: 0x1f): enum_t
        <22>   DW_AT_byte_size   : 4
        <23>   DW_AT_decl_file   : 1
        <24>   DW_AT_decl_line   : 1
        <25>   DW_AT_sibling     : <0x39>
    ...
    as well as no record for 'unsigned int'.

    Make the test-case pass with gcc/g++ 4.8 by making the presence of the
    'unsigned int' type optional.

    Tested on x86_64-linux.

    gdb/testsuite/ChangeLog:

    2019-10-03  Tom de Vries  <tdevries@suse.de>

        PR testsuite/25059
        * gdb.base/info-types.exp: Make the presence of the 'unsigned int'
        type optional.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Gdb-prs mailing list