From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7862) id 5D129385415B; Mon, 31 Oct 2022 12:44:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5D129385415B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667220290; bh=g7DTKRA9R+M5ZcxvBwjaR2hd1EnARG5XrxL0T9Kcb8c=; h=From:To:Subject:Date:From; b=Z/YOxUXPJxBm4TwlR5KjXrN66GAVC+hv40haIp+L+nOqNA0KqLMcJdYvIKJuezDp/ KSXAzi4dDV8aqA+FD5kit2HVMyFD9zxEdalwTMnSZneui2HT8eim3cTKE/oO1fUnS4 zx5XjTAVVcFzxEeAeT2k8RRz0uViQYknKr2OGjpE= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Bruno Larsen To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb/testsuite: fix gdb.cp/converts.exp to run with clang X-Act-Checkin: binutils-gdb X-Git-Author: Bruno Larsen X-Git-Refname: refs/heads/master X-Git-Oldrev: 2ce385da88704170ba6922743c437177eef2c09d X-Git-Newrev: 1e7416363963e27c8d122bee2397d4b48a482ec3 Message-Id: <20221031124450.5D129385415B@sourceware.org> Date: Mon, 31 Oct 2022 12:44:50 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D1e7416363963= e27c8d122bee2397d4b48a482ec3 commit 1e7416363963e27c8d122bee2397d4b48a482ec3 Author: Bruno Larsen Date: Tue Oct 4 16:09:05 2022 +0200 gdb/testsuite: fix gdb.cp/converts.exp to run with clang =20 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. =20 Approved-By: Andrew Burgess 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/conver= ts.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() =20 char av =3D 'a'; char *a =3D &av; // pointer to.. - B *bp; + B *bp =3D new B(); foo1_1 (a); // ..pointer foo1_2 (a); // ..array foo1_3 ((int*)a); // ..pointer of wrong type