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] fix gdb.base/access-mem-running.exp for clang testing Date: Mon, 12 Sep 2022 12:18:03 +0000 (GMT) [thread overview] Message-ID: <20220912121803.8A0863857004@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=96ca89d245e262578ef565247c1d68dff493d8a3 commit 96ca89d245e262578ef565247c1d68dff493d8a3 Author: Bruno Larsen <blarsen@redhat.com> Date: Wed Jul 20 16:44:32 2022 -0300 fix gdb.base/access-mem-running.exp for clang testing Clang was optimizing global_var away because it was not being used anywhere. this commit fixes that by adding the attribute used it. Diff: --- gdb/testsuite/gdb.base/access-mem-running.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.base/access-mem-running.c b/gdb/testsuite/gdb.base/access-mem-running.c index 6335f1bf199..cff6f0da820 100644 --- a/gdb/testsuite/gdb.base/access-mem-running.c +++ b/gdb/testsuite/gdb.base/access-mem-running.c @@ -19,7 +19,7 @@ static unsigned int global_counter = 1; -static volatile unsigned int global_var = 123; +static volatile unsigned int __attribute__((used)) global_var = 123; static void maybe_stop_here ()
reply other threads:[~2022-09-12 12:18 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=20220912121803.8A0863857004@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).