public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb/testsuite: fix gdb.cp/converts.exp to run with clang
@ 2022-10-31 12:44 Bruno Larsen
  0 siblings, 0 replies; only message in thread
From: Bruno Larsen @ 2022-10-31 12:44 UTC (permalink / raw)
  To: gdb-cvs

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-31 12:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-31 12:44 [binutils-gdb] gdb/testsuite: fix gdb.cp/converts.exp to run with clang Bruno Larsen

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).