public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Bruno Larsen <blarsen@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] gdb/testsuite: fix gdb.cp/converts.exp to run with clang
Date: Mon, 31 Oct 2022 12:44:50 +0000 (GMT)	[thread overview]
Message-ID: <20221031124450.5D129385415B@sourceware.org> (raw)

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

commit 1e7416363963e27c8d122bee2397d4b48a482ec3
Author: Bruno Larsen <blarsen@redhat.com>
Date:   Tue Oct 4 16:09:05 2022 +0200

    gdb/testsuite: fix gdb.cp/converts.exp to run with clang
    
    Clang attempts to minimize the size of the debug-info by not adding
    complete information about types that aren't constructed in a given
    file.  Specifically, this meant that there was minimal information about
    class B in the test gdb.cp/converts.exp.  To fix this, we just need to
    construct any object of type B in that file.
    
    Approved-By: Andrew Burgess <aburgess@redhat.com>

Diff:
---
 gdb/testsuite/gdb.cp/converts.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.cp/converts.cc b/gdb/testsuite/gdb.cp/converts.cc
index ecf806481fd..1224581a879 100644
--- a/gdb/testsuite/gdb.cp/converts.cc
+++ b/gdb/testsuite/gdb.cp/converts.cc
@@ -55,7 +55,7 @@ int main()
 
   char av = 'a';
   char *a = &av;       // pointer to..
-  B *bp;
+  B *bp = new B();
   foo1_1 (a);          // ..pointer
   foo1_2 (a);          // ..array
   foo1_3 ((int*)a);    // ..pointer of wrong type

                 reply	other threads:[~2022-10-31 12:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20221031124450.5D129385415B@sourceware.org \
    --to=blarsen@sourceware.org \
    --cc=gdb-cvs@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: link
Be 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).