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

cvs-commit at gcc dot gnu.org sourceware-bugzilla@sourceware.org
Wed Oct 16 15:01:00 GMT 2019


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

--- Comment #4 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=03e1ab9424bd1d37da5818549067ef7a7b7ec641

commit 03e1ab9424bd1d37da5818549067ef7a7b7ec641
Author: Tom de Vries <tdevries@suse.de>
Date:   Wed Oct 16 17:00:04 2019 +0200

    [gdb/testsuite] Fix local-static.exp with g++-4.8

    With g++-4.8, I see:
    ...
    (gdb) PASS: gdb.cp/local-static.exp: c++: print free_inline_func(void)
    print 'S::method()'::S_M_s_var_int^M
    No symbol "S_M_s_var_int" in specified context.^M
    (gdb) FAIL: gdb.cp/local-static.exp: c++: print
'S::method()'::S_M_s_var_int
    ...

    The variable is declared like this (showing pruned .ii):
    ...
    void S::method ()
    {
      static int S_M_s_var_int = 4;
    }
    ...

    But the DWARF generated for the variable is encapsulated in an unnamed
lexical
    block:
    ...
     <1><121>: Abbrev Number: 5 (DW_TAG_structure_type)
        <122>   DW_AT_name        : S
        ...
     <2><14f>: Abbrev Number: 6 (DW_TAG_subprogram)
        ...
        <150>   DW_AT_name        : (indirect string, offset: 0x599): method
        <156>   DW_AT_linkage_name: (indirect string, offset: 0x517): \
                                    _ZN1S6methodEv /* demangled: dS::method()
*/
        ...
     <1><3f8>: Abbrev Number: 21 (DW_TAG_subprogram)
        <3f9>   DW_AT_specification: <0x14f>
        ...
        <3fe>   DW_AT_low_pc      : 0x4004fc
        <406>   DW_AT_high_pc     : 0x2c /* 0x400528 */
        ...
     <2><418>: Abbrev Number: 17 (DW_TAG_formal_parameter)
        <419>   DW_AT_name        : (indirect string, offset: 0x68a): this
        ...
     <2><424>: Abbrev Number: 18 (DW_TAG_lexical_block)
        <425>   DW_AT_low_pc      : 0x400508
        <42d>   DW_AT_high_pc     : 0x1e /* 0x400526 */
     <3><435>: Abbrev Number: 22 (DW_TAG_variable)
        <436>   DW_AT_name        : (indirect string, offset: 0x29d):
S_M_s_var_int
    ...
    which has the effect that the variable is not addressable unless the
program
    counter is in the range of the lexical block.

    This is caused by gcc PR debug/55541, which was fixed in gcc 5.

    Mark in total 225 FAILs as XFAIL.

    Tested on x86_64-linux.

    gdb/testsuite/ChangeLog:

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

        PR testsuite/25059
        * gdb.cp/local-static.exp (do_test): Add xfails for gcc PR debug/55541.

    Change-Id: Ibe86707eecffc79f1bb474d7928ea7d0c39a00a2

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


More information about the Gdb-prs mailing list