diff options
author | Bruno Larsen <blarsen@redhat.com> | 2022-07-20 16:44:32 -0300 |
---|---|---|
committer | Bruno Larsen <blarsen@redhat.com> | 2022-09-12 14:08:44 +0200 |
commit | 96ca89d245e262578ef565247c1d68dff493d8a3 (patch) | |
tree | 6b607c72e1e9e34b1a64495d1dd251a4d339384a /gdb/testsuite | |
parent | 8a0eb1994337e7140715bced108c92db06bef612 (diff) | |
download | gdb-96ca89d245e262578ef565247c1d68dff493d8a3.zip gdb-96ca89d245e262578ef565247c1d68dff493d8a3.tar.gz gdb-96ca89d245e262578ef565247c1d68dff493d8a3.tar.bz2 |
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.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/gdb.base/access-mem-running.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.base/access-mem-running.c b/gdb/testsuite/gdb.base/access-mem-running.c index 6335f1b..cff6f0d 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 () |