gdb/testsuite: fix gdb.cp/converts.exp to run with clang
authorBruno Larsen <blarsen@redhat.com>
Tue, 4 Oct 2022 14:09:05 +0000 (16:09 +0200)
committerBruno Larsen <blarsen@redhat.com>
Mon, 31 Oct 2022 12:43:56 +0000 (13:43 +0100)
commit1e7416363963e27c8d122bee2397d4b48a482ec3
treedc0fb73b9815db2f40c4b564a66defccf2600c9d
parent2ce385da88704170ba6922743c437177eef2c09d
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>
gdb/testsuite/gdb.cp/converts.cc