public inbox for gdb-testers@sourceware.org help / color / mirror / Atom feed
From: gdb-buildbot@sergiodj.net To: gdb-testers@sourceware.org Subject: [binutils-gdb] [gdb/testsuite] Update psym-external-decl.exp for gcc-10/clang Date: Tue, 19 May 2020 21:24:41 -0400 [thread overview] Message-ID: <8caf140db24116e8874099291a7a48644c368ab6@gdb-build> (raw) *** TEST RESULTS FOR COMMIT 8caf140db24116e8874099291a7a48644c368ab6 *** commit 8caf140db24116e8874099291a7a48644c368ab6 Author: Tom de Vries <tdevries@suse.de> AuthorDate: Sat May 2 09:50:50 2020 +0200 Commit: Tom de Vries <tdevries@suse.de> CommitDate: Sat May 2 09:50:50 2020 +0200 [gdb/testsuite] Update psym-external-decl.exp for gcc-10/clang When running test-case gdb.base/psym-external-decl.exp with gcc-10, we have: ... (gdb) print aaa^M 'aaa' has unknown type; cast it to its declared type^M (gdb) FAIL: gdb.base/psym-external-decl.exp: print aaa ... With an an earlier version, gcc still emits the debug info for the declaration of aaa: ... <0><d2>: Abbrev Number: 1 (DW_TAG_compile_unit) <d8> DW_AT_name : psym-external-decl.c <1><f4>: Abbrev Number: 2 (DW_TAG_variable) <f5> DW_AT_name : aaa <ff> DW_AT_external : 1 <ff> DW_AT_declaration : 1 ... but with gcc-10 that's no longer the case. Fix the test-case by adding a use of aaa in psym-external-decl.c. That still doesn't work for clang, so skip test in that case. Tested with x86_64-linux, with gcc 7.5.0, gcc 10.0.0 and clang 5.0.2. Also tested by reverting corresponding fix and ensuring test-case still fails. gdb/testsuite/ChangeLog: 2020-05-02 Tom de Vries <tdevries@suse.de> * gdb.base/psym-external-decl.c (main): Add use of variable aaa. diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 737caffa0e..e741fd6a7d 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2020-05-02 Tom de Vries <tdevries@suse.de> + + * gdb.base/psym-external-decl.c (main): Add use of variable aaa. + 2020-05-01 Tom de Vries <tdevries@suse.de> * gdb.ada/operator_bp.exp: Allow more than required amount of diff --git a/gdb/testsuite/gdb.base/psym-external-decl.c b/gdb/testsuite/gdb.base/psym-external-decl.c index 7a4b107774..e2374327bd 100644 --- a/gdb/testsuite/gdb.base/psym-external-decl.c +++ b/gdb/testsuite/gdb.base/psym-external-decl.c @@ -20,6 +20,6 @@ extern int aaa; int main (void) { - return 0; + return aaa; } diff --git a/gdb/testsuite/gdb.base/psym-external-decl.exp b/gdb/testsuite/gdb.base/psym-external-decl.exp index bbcc274575..d0388d5655 100644 --- a/gdb/testsuite/gdb.base/psym-external-decl.exp +++ b/gdb/testsuite/gdb.base/psym-external-decl.exp @@ -15,6 +15,11 @@ standard_testfile .c psym-external-decl-2.c +get_compiler_info +if { [test_compiler_info "clang-*"] } { + return -1 +} + set srcfiles [list $srcfile $srcfile2] if { [build_executable_from_specs \
next reply other threads:[~2020-05-20 1:24 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-05-20 1:24 gdb-buildbot [this message] 2020-05-20 1:24 ` Failures on Fedora-i686, branch master gdb-buildbot 2020-05-20 1:39 ` Failures on Fedora-x86_64-cc-with-index, " gdb-buildbot 2020-05-20 1:58 ` Failures on Fedora-x86_64-m32, " gdb-buildbot 2020-05-20 2:14 ` Failures on Fedora-x86_64-m64, " gdb-buildbot 2020-05-20 2:40 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " gdb-buildbot 2020-05-20 2:59 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " gdb-buildbot 2020-05-20 4:44 ` Failures on Fedora-x86_64-native-gdbserver-m32, " gdb-buildbot 2020-05-20 5:01 ` Failures on Fedora-x86_64-native-gdbserver-m64, " gdb-buildbot
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=8caf140db24116e8874099291a7a48644c368ab6@gdb-build \ --to=gdb-buildbot@sergiodj.net \ --cc=gdb-testers@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).