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.base/msym-bp-shl when running with Clang Date: Thu, 22 Sep 2022 09:05:09 +0000 (GMT) [thread overview] Message-ID: <20220922090509.A502A385840F@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8d215439f665e51adc55dc2c4ba743ee576cb2fc commit 8d215439f665e51adc55dc2c4ba743ee576cb2fc Author: Bruno Larsen <blarsen@redhat.com> Date: Wed Jul 20 16:44:35 2022 -0300 gdb/testsuite: fix gdb.base/msym-bp-shl when running with Clang 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/gdb.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 <http://www.gnu.org/licenses/>. */ -static void +static void __attribute__ ((used)) foo (void) { }
reply other threads:[~2022-09-22 9:05 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=20220922090509.A502A385840F@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: linkBe 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).