From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7862) id A502A385840F; Thu, 22 Sep 2022 09:05:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A502A385840F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1663837509; bh=JTOqTmkiKNCuHhYXCtqqXr9QZYkTigXkKnQ9VL+mViQ=; h=From:To:Subject:Date:From; b=Q5wrbhlO4E6Db+Y2xAEWK5I2YhGNI/GZd2MQ2+wpLB84wEtboOFXujr5ZvE22mCDt WxXDhnLrBy81QwrG3wrgfcG662MIf5l2e/LTeDmGFqP4QtCL/YEtWv1f3J0U2hB1bp DjcHANs3Ix5GmI0eg7TrsLls6CnyLn3VDx1wNLoU= 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.base/msym-bp-shl when running with Clang X-Act-Checkin: binutils-gdb X-Git-Author: Bruno Larsen X-Git-Refname: refs/heads/master X-Git-Oldrev: 4037b4191a0ed4f8fc51564416519886bc88a1b7 X-Git-Newrev: 8d215439f665e51adc55dc2c4ba743ee576cb2fc Message-Id: <20220922090509.A502A385840F@sourceware.org> Date: Thu, 22 Sep 2022 09:05:09 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D8d215439f665= e51adc55dc2c4ba743ee576cb2fc commit 8d215439f665e51adc55dc2c4ba743ee576cb2fc Author: Bruno Larsen Date: Wed Jul 20 16:44:35 2022 -0300 gdb/testsuite: fix gdb.base/msym-bp-shl when running with Clang =20 When trying to test gdb.base/msym-bp-shl.exp using clang, it would have many failures because one of the version of the foo function was being optimized away. Adding __attribute__ ((used)) to it fixed this. Diff: --- gdb/testsuite/gdb.base/msym-bp-shl-main-2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.base/msym-bp-shl-main-2.c b/gdb/testsuite/gd= b.base/msym-bp-shl-main-2.c index e047ac1145a..009656fd9ea 100644 --- a/gdb/testsuite/gdb.base/msym-bp-shl-main-2.c +++ b/gdb/testsuite/gdb.base/msym-bp-shl-main-2.c @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . = */ =20 -static void +static void __attribute__ ((used)) foo (void) { }